Closed Bug 1108425 Opened 10 years ago Closed 1 year ago

:(-moz-)dir(rtl) doesn't match <textarea dir="auto"> with right-to-left text

Categories

(Core :: CSS Parsing and Computation, defect)

34 Branch
x86
macOS
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: sukolsak, Assigned: vhilla)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

See the following webpage: http://jsfiddle.net/b4rhxrc2/


Actual results:

The textarea doesn't have a green background.


Expected results:

The textarea should have a green background.

According to https://html.spec.whatwg.org/multipage/dom.html#the-directionality, the directionality of the textarea with a right-to-left character at the beginning should be 'rtl'. Therefore, it should match :(-moz-)dir(rtl).
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
We discussed this issue in bug 562169 comment 67 and following. From bug 562169 comment 70 it looks as if we do need to fix it
Assignee: nobody → smontagu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

This needs an owner...

Assignee: smontagu → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
Blocks: 675943

HTMLTextAreaElement is not updating its directionality the same way HTMLInputElement does via SetDirectionFromValue. Thus, neither the :dir selector nor the dirname attribute are working correctly with dir=auto.

I copy-pasted all SetDirectionFromValue-related parts from HTMLInputElement to HTMLTextAreaElement

Assignee: nobody → vhilla
Status: NEW → ASSIGNED

The following patch is waiting for review from an inactive reviewer:

ID Title Author Reviewer Status
D176999 Bug 1108425 - Fix dir=auto for textarea with rtl text. r=bzbarsky vhilla bzbarsky: Inactive

:vhilla, could you please find another reviewer?

For more information, please visit BugBot documentation.

Flags: needinfo?(vhilla)
Attachment #9331316 - Attachment description: Bug 1108425 - Fix dir=auto for textarea with rtl text. r=bzbarsky → WIP: Bug 1108425 - Fix dir=auto for textarea with rtl text.
Flags: needinfo?(vhilla)
Attachment #9331316 - Attachment description: WIP: Bug 1108425 - Fix dir=auto for textarea with rtl text. → Bug 1108425 - Fix dir=auto for textarea with rtl text. r=smaug
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f394b22e31d
Fix dir=auto for textarea with rtl text. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40032 for changes under testing/web-platform/tests
Upstream PR was closed without merging

I wanted to delete bidi/726420-1.html but missed to update reftest.list.

Flags: needinfo?(vhilla)
Pushed by vhilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6638f5e6d9f
Fix dir=auto for textarea with rtl text. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: