Steps to Reproduce
Currently no easy reproducing case, since it is a race condition.
Current Result
When anchor component is removed in between popup.open and popup.reposition (called after finishing to animate popup opening):
caught (in promise) TypeError: Cannot read properties of undefined (reading 'style') at zjq.dimension (zk.wpd:14096:27) at init.getPositionArgs_ (zk.wpd:45729:21) at init.reposition (zk.wpd:45695:38) at init.afterSize (zk.wpd:45686:10) at _invoke (zk.wpd:15762:14) at init.fire (zk.wpd:15748:9) at _fire (zk.wpd:15905:13) at Object.fireDown (zk.wpd:16138:7) at Object.fireDown (zk.wpd:18073:28) at Object.fireSized (zk.wpd:18961:16)
Expected Result
harden popup reposition to check if _fakeParent is attached to the page
(currenly only check for _fakeParent being present)
Debug Information
Workaround
<script><![CDATA[ zk.afterLoad("zul.wgt", function () { var _xPopup = {}; zk.override(zul.wgt.Popup.prototype, _xPopup, { reposition: function() { if(!this._fakeParent || !(this._fakeParent && this._fakeParent.$n() == null)){ return _xPopup.reposition.apply(this, arguments); }else{ try{ console.log("closing popup due to anchor not existing in page."); this.close(); }catch(e){ console.warn(e.stack); } } } }); }); ]]></script>