Skip to content

Instantly share code, notes, and snippets.

@p0deje
Last active November 19, 2015 05:34
Show Gist options
  • Save p0deje/c549e93fa19bf7aaee49 to your computer and use it in GitHub Desktop.
Save p0deje/c549e93fa19bf7aaee49 to your computer and use it in GitHub Desktop.
Inconsistencies in elementFromPoint

elementFromPoint inconsistencies

Steps to reproduce:

  1. Open the HTML page.
  2. Execute snippet in console.

Browsers:

  1. Firefox 38.3.0.
  2. Chrome 46.0.2490.
  3. Safari 9.0.1.

Operating System: OS X El Capitain 10.11.1

Zoom is set to 100% in all browsers.

img vs area

HTML: google_map

Snippet: document.elementFromPoint(53, 131.26666259765625);

  • Firefox: img
  • Chrome: area
  • Safari: area

form vs select

HTML: formPage

Snippet: document.elementFromPoint(588, 198)

  • Firefox: form
  • Chrome: form
  • Safari: select
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment