Closed Bug 558201 Opened 14 years ago Closed 14 years ago

The resizer in RTL textareas shows an incorrect cursor

Categories

(Core :: Layout: Form Controls, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: ehsan.akhgari, Unassigned)

References

(Depends on 1 open bug, )

Details

(Keywords: rtl)

When you hover the resizer icon for RTL textareas, the cursor should be NESW, however it's currently NWSE.
Is this Mac specific?
No.  I also tested it on Linux and Windows.

On Linux, something very strange happens.  The resizer icon doesn't even appear in RTL mode, but when I move the cursor to the lower right corner (which is where the LTR resizer icon should be), the cursor appears in NWSE form (the wrong form.)

On Windows, the cursor appears in NWSE form, just like on Mac and Linux.
OS: Mac OS X → All
This is likely caused because the cursor is set in resizer.css as:

resizer[dir="bottomend"]:-moz-locale-dir(rtl) {
  cursor: sw-resize;
}

There isn't a way to set the cursor property because the direction property is rtl though, right?

The only way I see to fix this is to add an nsResizerFrame::GetCursor implementation.
(In reply to comment #3)
> This is likely caused because the cursor is set in resizer.css as:
> 
> resizer[dir="bottomend"]:-moz-locale-dir(rtl) {
>   cursor: sw-resize;
> }
> 
> There isn't a way to set the cursor property because the direction property is
> rtl though, right?

AFAIK, no.  And :-moz-locale-dir doesn't work because we're in an HTML document.

> The only way I see to fix this is to add an nsResizerFrame::GetCursor
> implementation.

How about we provide a fallback implementation in resizer.xml to detect if we're inside an HTML document (actually, to detect if we're not inside a XUL document) and set a direction attribute based on the direction computed style, so that we can use that in CSS to set the correct cursor?
Please note that Simon marked the reftest as random because of what I observed in comment 2.

http://hg.mozilla.org/mozilla-central/diff/201589e94d3b/layout/reftests/forms/reftest.list

This needs to be reverted when the fix for this bug lands.
Depends on: 563665
blocking2.0: ? → final+
Priority: -- → P1
Depends on: 554810
Fixed by bug 554810.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
> http://hg.mozilla.org/mozilla-central/diff/201589e94d3b/layout/reftests/forms/reftest.list
> 
> This needs to be reverted when the fix for this bug lands.

http://hg.mozilla.org/mozilla-central/rev/328ec01e7119

(This was forgotten until my script noticed it.)
You need to log in before you can comment on or make changes to this bug.