Created
July 4, 2013 18:47
-
-
Save AutomatedTester/5929589 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js | |
| index 4796dfe..523927c 100644 | |
| --- a/javascript/atoms/dom.js | |
| +++ b/javascript/atoms/dom.js | |
| @@ -618,6 +618,13 @@ bot.dom.isShown = function(elem, opt_ignoreOpacity) { | |
| if (!bot.dom.isElement(elem)) { | |
| throw new Error('Argument to isShown must be of type Element'); | |
| } | |
| + // Check the element is the top element | |
| + var doc = goog.dom.getOwnerDocument(elem); | |
| + var locationOfElement = goog.style.getClientPosition(elem); | |
| + var elemAtPoint = doc.elementFromPoint(locationOfElement.x, locationOfElement.y); | |
| + if (elemAtPoint !== null && (elemAtPoint != elem)){ | |
| + return false; | |
| + } | |
| // Option or optgroup is shown iff enclosing select is shown (ignoring the | |
| // select's opacity). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment