-
Bug
-
Resolution: Fixed
-
Normal
-
8.6.0.1
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.6.2 S1, ZK 8.6.2 S2
Steps to Reproduce
<hlayout id="hlt"> <button id="btn" label="show notification" onClick='Clients.showNotification("Not disappearing box", Clients.NOTIFICATION_TYPE_WARNING, hlt, "bottom_center", 3000, true);'/> </hlayout>
1. run the code above
2. click the button
Current Result
zul.box.wpd:95 Uncaught TypeError: Cannot read property 'style' of undefined at init.onChildVisible_ (zul.box.wpd:95) at init.setVisible (zk.wpd:20313) at init.afterOpenAnima_ (zk.wpd:35528) at HTMLDivElement.<anonymous> (zk.wpd:38352) at HTMLDivElement.opt.complete (zk.wpd:9663) at fire (zk.wpd:3231) at Object.fireWith [as resolveWith] (zk.wpd:3344) at tick (zk.wpd:9118) at jQuery.fx.tick (zk.wpd:9695)
1. the notification doesn't close itself automatically
2. can't close by x icon
Expected Result
close itself automatically
debug info
- 8.6.1.FL still contains this bug.
- happens when inside hlayout and vlayout, not in a window or div
Root Cause
the parent changed since refine-4130 see https://github.com/zkoss/zk/blame/762373a0f31f09c550187cf97dfc8ec7e552fbc0/zul/src/archive/web/js/zul/wgt/Notification.js#L35
parent became hlayout in setVisible(), and Layout.js override onChildVisible_ cause the js error