MCPcopy
hub / github.com/helloxz/onenav / getZIndexOfTriggerTarget

Function getZIndexOfTriggerTarget

static/jQuery-contextMenu/jquery.contextMenu.js:542–553  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

540 }
541 var targetZIndex = 0;
542 var getZIndexOfTriggerTarget = function (target) {
543 if (target.style.zIndex !== '') {
544 targetZIndex = target.style.zIndex;
545 } else {
546 if (target.offsetParent !== null && typeof target.offsetParent !== 'undefined') {
547 getZIndexOfTriggerTarget(target.offsetParent);
548 }
549 else if (target.parentElement !== null && typeof target.parentElement !== 'undefined') {
550 getZIndexOfTriggerTarget(target.parentElement);
551 }
552 }
553 };
554 getZIndexOfTriggerTarget(e.target);
555 // If targetZIndex is heigher then opt.zIndex dont progress any futher.
556 // This is used to make sure that if you are using a dialog with a input / textarea / contenteditable div

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected