innerText is affected by css text-transform: uppercase
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: jaborandi, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
go to https://ewnjtgouierg.github.io/ffbugs/UpperCaseInnerText.html
Actual results:
innerText = SOMETHING
innerHTML = Something
Expected results:
both should be Something
as the inner text of the span is
it is displayed in upper case, because it has a style attribute with text-transform: uppercase - it is used to STYLE the element, it shouldn't affect the actual data inside it
Reporter | ||
Updated•19 days ago
|
Comment 1•19 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•19 days ago
|
||
Per https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
The innerText property of the HTMLElement interface represents the rendered text content of a node and its descendants.
and https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute
- If node is a Text node, then for each CSS text box produced by node, in content order, compute the text of the box after application of the CSS 'white-space' processing rules and 'text-transform' rules, set items to the list of the resulting strings, and return items. The CSS 'white-space' processing rules are slightly modified: collapsible spaces at the end of lines are always collapsed, but they are only removed if the line is the last line of the block, or it ends with a br element. Soft hyphens should be preserved. [CSSTEXT]
Comment 3•19 days ago
|
||
Perhaps you want textContent instead? https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
Reporter | ||
Comment 4•16 days ago
|
||
:longsonr thank you and sorry for making you give me lessons in web api here)
Description
•