[CLOSED] Mask pushing componentes to the side

  1. #1

    [CLOSED] Mask pushing componentes to the side

    Hello,

    When I the mask is showing, it is pushing the components to the side, when it is hiding the scrollbar.

    Now, it is really making my life hard, because it is disabling the htmleditors when this is happening.

    Attached are the screenshots.

    Url to test this out:
    Stepts to reproduce:
    1. Go to: http://www.passeagora.com.br/questoe...rsiva-manha/1/
    2. Press 'Responder'

    Old topic that this subjects was discussed: http://forums.ext.net/showthread.php...ot-positioning

    THANKS
    Attached Thumbnails Click image for larger version. 

Name:	1.png 
Views:	42 
Size:	44.0 KB 
ID:	4010   Click image for larger version. 

Name:	2.png 
Views:	36 
Size:	47.3 KB 
ID:	4011  
    Last edited by Daniil; Apr 06, 2012 at 10:01 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by SouthDeveloper View Post
    When I the mask is showing, it is pushing the components to the side, when it is hiding the scrollbar.
    It appears to be reproducible with a vertical scrollbar only, right? I mean when there are both - vertical and horizontal - scrollbars, there is no pushing.

    Can you confirm?

    Also, please confirm that you are using the following suggestion.
    http://forums.ext.net/showthread.php...ll=1#post68136

    Quote Originally Posted by SouthDeveloper View Post
    Now, it is really making my life hard, because it is disabling the htmleditors when this is happening.
    I'm afraid I don't understand how it can disable the HtmlEditors. Please clarify. Is it reproducible with the online example?
  3. #3
    Good morning,

    1. Yes, it is reproducible with the vertical scrollbar only;
    2. Yes, I am using the suggestion;
    3. Bellow is a simplified code to reproduce the problem.

    Steps to reproduce the problem in the code bellow, using firefox:
    1. Press Show Panel 1;
    2. Press Show Panel 2;
    3. Press Send;
    4. Scroll to the bottom of the screen, there will be a htmleditor disabled because of the pushing.

    Also, I found out if I remove the mask from the resource manager and use the mask from the button
    (#{DirectMethods}.Test( { eventMask : { showMask : true } })")
    , the pushing doesnt occur. Is the mask from the resource manager and the one from the button different?


    THANKS

    <%@ Page Language="C#" %>
    
    <script runat="server">
        [DirectMethod]
        public void Test()
        {
    
        }
    </script>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Items Actions - Ext.NET Examples</title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server">
            <Listeners>
                <BeforeAjaxRequest Handler="Ext.getBody().addClass('x-mask-padding');
                                            /* Se desabilitada, esconde a máscara */
                                            if (!o.eventMask || o.eventMask.showMask !== false) { Ext.net.Mask.show(); }" />
                <AjaxRequestComplete Handler="Ext.getBody().removeClass('x-mask-padding'); Ext.net.Mask.hide();" />
                <AjaxRequestException Handler="Ext.getBody().removeClass('x-mask-padding'); Ext.net.Mask.hide();" />
            </Listeners>
        </ext:ResourceManager>
        <div style="width: 800px; margin: 0 auto">
            <ext:Button runat="server" Text="Show Panel 1" OnClientClick="#{Panel1}.show();" />
            <ext:Button runat="server" Text="Show Panel 2" OnClientClick="#{Panel2}.show();" />
            <ext:Panel ID="Panel1" Hidden="true" Layout="FitLayout" runat="server">
                <Items>
                    <ext:HtmlEditor runat="server" />
                </Items>
            </ext:Panel>
            <ext:Button Text="Send" OnClientClick="#{DirectMethods}.Test()" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="400" runat="server" />
            <ext:Panel Title="Name" Html="Name" Height="200" runat="server" />
            <ext:Panel Html="Name" Height="100" runat="server" />
            <ext:Panel ID="Panel2" Hidden="true" Layout="FitLayout" runat="server">
                <Items>
                    <ext:HtmlEditor runat="server" />
                </Items>
            </ext:Panel>
        </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Mar 28, 2012 at 12:39 PM. Reason: Please use [CODE] tags
  4. #4
    Quote Originally Posted by SouthDeveloper View Post
    Also, I found out if I remove the mask from the resource manager and use the mask from the button
    (#{DirectMethods}.Test( { eventMask : { showMask : true } })")
    , the pushing doesnt occur. Is the mask from the resource manager and the one from the button different?
    Yes, that's right.

    Regarding to pushing.

    I can't see
    <style type="text/css">
        .x-mask-padding {
            padding-right: 17px;
        }
    </style>
    in your example.

    It fixes pushing.

    Regarding to disabling HtmEditor after calling the DirectMethod.

    1. It appears to be not related to pushing.

    2. I was able to reproduce it in FireFox only, it's ok in IE and Chrome. Can you confirm?
  5. #5
    THANKS. Mask is now fixed.


    BUT, we have a problem with htmleditor.

    It is like you said, it only happens in ff, and it is not related to the mask.

    Can you, please, have a look at it?
  6. #6
    Strange issue, I was able to reproduce it with the following example. Again - only FireFox.

    If comment the HtmlEditor1, then all is ok.

    We are investigating. It looks a bug in FireFox.

    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Button runat="server" Text="Show HtmlEditor" OnClientClick="HtmlEditor2.show();" />
    
        <ext:HtmlEditor ID="HtmlEditor1" runat="server" Hidden="true" />
        
        <ext:HtmlEditor ID="HtmlEditor2" runat="server" Hidden="true" />
    </body>
    </html>
  7. #7
    Just a note - an issue is not reproducible in FireFox 10.0.2, but reproducible in FireFox 11.0. So, I think, it's rather a FireFox bug.

    As a workaround we can suggest the following:

    1. Set up
    ID="HtmlEditor2"
    for the problem HtmlEditor.

    2. Use
    <AjaxRequestComplete Handler="Ext.getBody().removeClass('x-mask-padding'); 
                                  Ext.net.Mask.hide(); 
                                  if (Panel2.isVisible()) { 
                                      HtmlEditor2.tb.getComponent('sourceedit').xtbHidden = true; 
                                      HtmlEditor2.toggleSourceEdit(true);
                                      HtmlEditor2.toggleSourceEdit(false);
                                  }" />
    One problem - it causes the HtmlEditor to be focused.

    I think it might be fixed in the next FireFox release.
  8. #8
    Hi again!


    I got many of the pushing cases solved, but I still have some left :(

    Steps to reproduce:

    1. Using firefox or ie;
    2. Go to http://www.passeagora.com.br/concursos/pesquisar/ ;
    3. Choose any item in the Região dropdown field;
    4. Mask will push the screen.

    Thanks
  9. #9
    Hi,

    Reproduced.

    1. FireFox + no vertical scrolling => pushing.

    2. IE + vertical scrolling => pushing.

    Can you confirm?

    Please try:
    <BeforeAjaxRequest Handler="var html = document.getElementsByTagName('html')[0];
                                    hasVScroll = html.clientHeight < html.scrollHeight;
    
                                if (!((Ext.isGecko && !hasVScroll) ||
                                    (Ext.isIE && hasVScroll))) {
                                                
                                    Ext.getBody().addClass('x-mask-padding');
                                }
                                            
                                if (!o.eventMask || o.eventMask.showMask !== false) { 
                                    Ext.net.Mask.show(); 
                                }" />
    If the issue persists, please provide a sample to reproduce.
  10. #10
    Hi

    Solved for me again!

    Thanks

Similar Threads

  1. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  2. [CLOSED] How to display 2 controls side by side (on the same line)
    By hgouw in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 19, 2011, 4:24 AM
  3. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  4. Mask to handle large server side process
    By NewGuy_001 in forum 1.x Help
    Replies: 2
    Last Post: Jun 12, 2010, 8:55 PM
  5. Replies: 4
    Last Post: Mar 19, 2010, 11:35 AM

Posting Permissions