Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5258

setFocus() doesn't work on a textbox in a modal window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Normal
    • 10.0.0, 9.6.4
    • 9.5.1.4
    • None
    • Security Level: Jimmy

    Description

      Steps to Reproduce

      <zk>
          <button label="show modal" onClick="showModal()"/>
          <zscript><![CDATA[
      public void showModal(){
        Window w = new Window();
        w.setPage(page);
      
        w.appendChild(new Toolbarbutton("get focus"));
        Textbox box1 = new Textbox();
        w.appendChild(box1);
        box1.setFocus(true);
        w.doModal();
      }
       ]]></zscript>
      </zk>
      

      1. click the button
      2. check the focus

      Current Result

      the toolbarbutton gets the focus

      Expected Result

      the textbox gets the focus

      Debug Information

      • 9.5.0.3 doesn't have this bug
      • no bug happens if:
        • show the modal window at page creation
        • replace a toolbarbutton with a button

      Workaround

      zk-5258.js

      Attachments

        Issue Links

          Activity

            People

              gordonhsu gordonhsu
              hawk hawk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: