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

2nd popup open by click menu item on 1st popup will close immediiate (on fast bandwidth)


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.0
    • Components
    • Security Level: Jimmy
    • None
    • firefox 78
      linux (debian mint 4 LMDE Debbie)
      local or intranet or fast internet

      Steps to Reproduce

      code at https://zkfiddle.org/sample/1615786/4

          <toolbarbutton label="click me to show main popup" onClick="showMainPopup()" image="https://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/ArrowDown-16x16.png"/>
      	<button id="showHere" label="Below" image="https://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/ArrowDown-16x16.png" width="125px" />
        	<menupopup id="ppMain" width="300px">
          	<menuitem label="just test" />
          	<menuitem label="just test" />
          	<menuitem label="just test" />
          	<menuitem label="just test" />
          	<menuitem label="click me to show other popup" onClick="showNewPopup()" image="https://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/ArrowDown-16x16.png" />
        	<menupopup id="ppNew" width="300px">
          	<menuitem label="just test" image="https://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/ArrowDown-16x16.png" />
      		public void showMainPopup(){
      			ppMain.open (showHere, "after_start");
      		public void showNewPopup(){
      			ppNew.open (showHere, "after_start");

      1. click button 1 to show popup 1 on button 2
      popup 1 has a menu item
      2. click menu item to show popup 2

      Current Result

      popup 2 shows but immediately closes

      Expected Result

      popup 2 shows and remains visible

      Debug Information

      1. on zkfiddle, the issue does not happen because the network is slow
      but when run on local then issue happen on firefox (chrome does not get the issue)
      2. firefox 85 + Mac can also produce this bug
      3. can reproduce it with 9.5.1.FL.20210219-Eval


      sleep about 200milisecond at server when handle menuitem click will help

      { Thread.sleep(200); }

      catch (InterruptedException ex)

      { // safe to ignore }

            DevChu DevChu
            hiepgau hiepgau
            0 Vote for this issue
            4 Start watching this issue