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

popup doClick prevents DOM state update after ZK 3606

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.1
    • None
    • None
    • None

      Steps to Reproduce

      comment out workaround in:
      http://zkfiddle.org/sample/21s01q9/10-popupradioevent-with-workaround

      or

      <zk>
      <button label="click me" popup="zoomLevelPopup, after_start" />
      <popup id="zoomLevelPopup">
       <radiogroup onCheck='Clients.log("index"+self.getSelectedIndex())'>
         <vlayout>
          <radio label="1" />
          <radio label="2" selected="true" />
          <radio label="3"  />
         </vlayout>
       </radiogroup>
      </popup>
      </zk>
      

      Current Result

      Click the radio inside the popup, the radio display appear not be updated.
      widget and component values are updated. listeners are triggered.

      Expected Result

      Popup shouldn't suppress the change of DOM state value causing the display not to be updated.

      Debug Info

      following
      https://github.com/zkoss/zk/commit/ce94d2c16181d60f115416bf703d9a47debd0cdb#diff-c32e17bbb3558712356bc274e4f442e8

      Root Cause

      event.stop() seem to prevent DOM state update. DOM attributes are updated, but not the element state value.

      Workaround

      /!\ restore a know issue with popups, popup reopens when clicking content.
      <script><![CDATA[
      zk.afterLoad('zul.wgt', function() {
      var xPopup = {};
      zk.override(zul.wgt.Popup.prototype, xPopup ,{
      doClick_ : function(evt) {

      }
      });//zk.override
      });//zk.afterLoad
      ]]></script>

            bobpeng bobpeng
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified