-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.4
-
None
-
Security Level: Jimmy
-
None
-
IE 11
-
None
Steps to Reproduce
Play fiddle:
http://zkfiddle.org/sample/22tagcb/1-IE-navbar-Jump
Open the 2nd navitem
Resize the window to cause a scrollbar
Scroll down to last item
Click last item
Actual Result
navbar scroll jump up
item selection doesn't trigger
Expected Result
Navbar scroll doesn't change
item selection triggers
Debug Info
Comment out this section in fiddle to remove ZK-3230 fix
// if (zk.ie) { // oldStyle = wgtVParent.style.position; // wgtVParent.style.position = 'fixed'; // } // DO NOT COMMENT OUT FOCUS wgt.focus(); // if (zk.ie) wgtVParent.style.position = oldStyle;
Root Cause
Caused by change of css position attribute during zk.Widget.mimicMouseDown
Workaround
remove previous fix while waiting for this ticket
<script><![CDATA[ zk.afterLoad('zk', function() { var xWidget = {}; zk.override(zk.Widget, xWidget ,{ mimicMouseDown_: function (wgt, noFocusChange, which) { //called by mount var modal = zk.currentModal; if (modal && !wgt) { var cf = zk.currentFocus; //Note: browser might change focus later, so delay a bit //(it doesn't work if we stop event instead of delay - IE) if (cf && zUtl.isAncestor(modal, cf)) cf.focus(0); else modal.focus(0); } else if (!wgt || wgt.canActivate()) { if (!noFocusChange) { var wgtVParent; zk._prevFocus = zk.currentFocus; zk.currentFocus = wgt; if (wgt && (wgtVParent = wgt.$n('a')) && jq.nodeName(wgtVParent, 'button', 'input', 'textarea', 'a', 'select', 'iframe')) { //ZK-3230: ie lost the focus when click on scroll bar, to prevent scroll into view automatically, set VParent's position to "fixed" temporary. var oldStyle; // if (zk.ie) { // oldStyle = wgtVParent.style.position; // wgtVParent.style.position = 'fixed'; // } // DO NOT COMMENT OUT FOCUS wgt.focus(); // if (zk.ie) wgtVParent.style.position = oldStyle; } zk._cfByMD = true; setTimeout(function () {zk._cfByMD = false; zk._prevFocus = null;}, 0); //turn it off later since onBlur_ needs it } if (wgt) // F70-ZK-2007: Add the button number information. zWatch.fire('onFloatUp', wgt, {triggerByClick: which}); //notify all else for (var dtid in zk.Desktop.all) zWatch.fire('onFloatUp', zk.Desktop.all[dtid]); //notify all } } });//zk.override });//zk/afterLoad ]]></script>