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

about listen onShow and OnHide

XMLWordPrintable

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

      <window>
      	<button id="btn" label="button"/>
      	<button label="show/hide" onClick="btn.setVisible(!btn.isVisible());"/>
      	<script defer="true">
      	var btn = zk.Widget.$("$btn");
      	zWatch.listen( {
      	onHide: [
      	btn, function(){zk.log("[zWatch]onHide "+this.id)}
      	]
      	,onShow: [
      	btn, function(){zk.log("[zWatch]onShow "+this.id)}
      	]
      	});
      	btn.listen({
      	onHide: function(){zk.log("[Widget]onHide "+this.id)}
      	,onShow: function(){zk.log("[Widget]onShow "+this.id)}
      	});
      	</script>
      </window>
      

      When run the above code in ZK 5.0.6, it will trigger all function that I listened.
      But when run the above code in ZK 5.0.8, it will only trigger the function which alert "[zWatch]onShow ".
      Is this a bug ?

            SimonPai SimonPai
            karry karry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: