Bug 220830

Summary: textarea can't handle switch direction
Product: WebKit Reporter: Ebrahim Byagowi <ebrahim>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, gsnedders, mmaxfield, nmouchtaris, simon.fraser, smoley, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: Unspecified   
URL: data:text/html,<textarea id=textarea>a%0Ab%0Ac</textarea><button onclick="textarea.dir=textarea.dir==='rtl'?'ltr':'rtl'">Switch</button><br><textarea>a%0Ab%0Ac</textarea><br><textarea dir=rtl>a%0Ab%0Ac</textarea>
Attachments:
Description Flags
actual none

Description Ebrahim Byagowi 2021-01-21 14:37:11 PST
Created attachment 418087 [details]
actual

Open
data:text/html,<textarea id=textarea>a%0Ab%0Ac</textarea><button onclick="textarea.dir=textarea.dir==='rtl'?'ltr':'rtl'">Switch</button><br><textarea>a%0Ab%0Ac</textarea><br><textarea dir=rtl>a%0Ab%0Ac</textarea>

Use switch button or right click switch textarea's direction from Paragraph Direction

Expected:
Like other browsers, not confused expand icon, to have the first like the third after switch button being hit.

Actual:
The used expand icon is confused when direction is changed. Also the scrollbar's animation isn't correct.
Comment 1 Ebrahim Byagowi 2021-01-21 14:39:24 PST
Not that impacting but hit me while using Safari on some site so will try to work on this myself but helps would be nice :)
Comment 2 Smoley 2021-01-21 16:43:24 PST
Thanks for filing, I can reproduce this on Safari 13.1.3 and STP 118.
Comment 3 Radar WebKit Bug Importer 2021-01-21 16:43:42 PST
<rdar://problem/73475239>
Comment 4 Sam Sneddon [:gsnedders] 2021-01-22 11:33:50 PST
Note that this appears to be specifically when the the textarea has overflow. If you expand the textarea before changing its direction such that there is no overflow, this doesn't reproduce.

I think :smfr has been working on overflow-related stuff recently, so CC'ing him.