-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.6, 8.6.0
-
Security Level: Jimmy
-
None
Steps to Reproduce
<zk> <button label="confirm close" onClick='Clients.confirmClose("Please stay here")'/> <button label="trigger redirect" onClick='execution.sendRedirect("");'/> <button label="Test Server is still responding to AJAX" onClick="Clients.log(event.toString())"/> </zk>
- click "confirm close"
- click "trigger redirect"
- click cancel (stay on page don't reload)
- click button "Test Server ..."
Current Result
the button doesn't work anymore
Expected Result
when staying on the page the UI should continue working
Debug Info
after the redirect in the same browser tab the client engine is disabled an no more AU request are sent to the server
Root Cause
https://github.com/zkoss/zk/blob/v8.6.0/zk/src/archive/web/js/zk/au.js#L1221
Workaround
patch the redirect function to keep the au requests enabled:
zk.afterMount(function() { var redirectOrig = zAu.cmd0.redirect; zAu.cmd0.redirect = function() { redirectOrig.apply(this, arguments); if(zk.confirmClose && zAu.disabledRequest) { zAu.disabledRequest = false; } } });
- relates to
-
ZK-2616 Timeout on long running redirect if user triggers more events
- Closed