-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.5
-
None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
Run fiddle:
http://zkfiddle.org/sample/36klec2/2-datebox-popup-visible-false-on-other-popup-close
Click on button to open main popup
Click on datebox button to open datebox popup
Click outside of the main popup to close both popup at the same time
Click on the button to open the main popup
Click on the datebox button to open the datebox popup
Current Result
The datebox popup is open (added to dom tree) but has the visible:false; style rule.
It is opened, but not visible.
Expected Result
The datebox popup should be visible
Debug Info
Main popup closing afterCloseAnima_ calls main popup setVisible(false)
https://github.com/zkoss/zk/blob/d41c1c2afaa24dc783d30c410dd0ba120d306fa3/zul/src/archive/web/js/zul/wgt/Popup.js#L285
main popup setVisible(false) flags all other floating popups as visible:false
https://github.com/zkoss/zk/blob/d41c1c2afaa24dc783d30c410dd0ba120d306fa3/zk/src/archive/web/js/zk/widget.js#L1962
Root Cause
Visible:false is not reverted on datebox when becoming visible.
Workaround
Tested on ZK 8.0.1.1 and ZK 8.0.5
<script><![CDATA[ zk.afterLoad('zul.db', function() { var xDatebox = {}; zk.override(zul.db.Datebox.prototype, xDatebox ,{ setOpen : function() { this.$n('pp').style.visibility = ''; var result = xDatebox.setOpen.apply(this, arguments); return result; } });//zk.override });//zk.afterLoad ]]></script>