chapmanu / fragmentions

A proposal and polyfill to use ## double-hash anchors as links to individual words or phrases in a document.
https://github.com/chapmanu/fragmentions
Other
76 stars 13 forks source link

Browser inconsistencies with text-transform #12

Open rickard2 opened 10 years ago

rickard2 commented 10 years ago

It seems that CSS text-transform is treated differently depending on if the browser has the innerText property on the element.

Simple test case: http://lightning.montania.se/fragmention.html##HELLO

Chrome canary Mac: works Chrome stable Mac: works Firefox 29.0.1 Mac: doesn't work

In Chrome:

document.childNodes[1].innerText // HELLO

In Firefox:

document.childNodes[1].innerText // undefined
document.childNodes[1].textContent // hello

Not sure how to work around this or what the expected behavior really is. But for the end user, the text sure looks like uppercase when using text-transform.

jonathantneal commented 10 years ago

I would lean towards what it looks like in the end result.