jQuery UI Widgets Forums Dialogs and Notifications Window Window height problem if initContent is used

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 5 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • rhorvath
    Participant

    Hello,

    The height of the window is not set correctly if jqxInput widgets are initialized within initContent of jqxWindow. If you move the code, within initContent, before the creation of jqxWindow everything is fine.

    It looks to me a bug, because the purpose of the initContent, according to documentation, is to initialize other widgets.

    Here is an example code:

    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="jqwidgets/styles/jqx.energyblue.css" type="text/css" />
    <script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxinput.js"></script> 
    
    <script type="text/javascript">
      $(document).ready(function () {
        $('#dialog').jqxWindow({
          theme: "energyblue",
          isModal: true,
          closeButtonAction: 'close',
          width: 360,
          initContent: function() {
            $('input').jqxInput({
              theme: "energyblue",
              width: 250,
              height: 18
            });    
          }      
        });
      });
    </script>
    
    </head>
    <body>
     <div id="dialog">
      <div>Test Me</div>
      <div>
        <input type="text" name="email1" id="email1" /><br/>
        <input type="text" name="email2" id="email2" /><br/>
        <input type="text" name="email3" id="email3" /><br/>
        <input type="text" name="email4" id="email4" /><br/>
        <input type="text" name="email5" id="email5" /><br/>
        <input type="text" name="email6" id="email6" /><br/>
        <input type="text" name="email7" id="email7" /><br/>
        <input type="text" name="email8" id="email8" /><br/>
        <input type="text" name="email9" id="email9" /><br/>
      </div>
     </div>
    </body>
    </html>

    Dimitar
    Participant

    Hello rhorvath,

    In the case with initContent, the window is automatically sized based on the height of the un-initialized inputs. This is a normal behaviour, because the window’s height is adjusted before initContent is called.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.