oslego / chrome-backspace-back

Google Chrome extension that restores browser behavior of navigating to previous page when pressing the Backspace key.
76 stars 7 forks source link

tagName is not always in uppercase #6

Closed 0xE1 closed 8 years ago

0xE1 commented 8 years ago

tagName can be both uppercase and lowercase. An example where it's in lowercase is http://eu.battle.net/en/

oslego commented 8 years ago

document.activeElement.tagName always returns uppercase results, regardless of the input casing. The issue on that page is likely something else.

0xE1 commented 8 years ago

Developer Tools are telling the different story though: http://puu.sh/qDOqo/fb7ada62f0.png I know it shouldn't be by HTML specification, but anyhow, it's not uppercase.

It's lowercase even in Edge browser :3

oslego commented 8 years ago

You're right! The tagName is lowercase on that website, though I'm not sure why. Here's a reduced test case that doesn't exhibit the issue, yet the battle.net form does have it. I've tried different doctypes, even the whole battle.net page source and it still doesn't exhibit the issue locally, but the live one does. Perhaps there's a script in there that flips Chrome into a quirks mode that I don't know of.

A fix for this issue is coming right up. Thank you for your persistence! :)