Bug 198908

Summary: Text caret renders incorrectly and is hard to use on iOS when text is rotated
Product: WebKit Reporter: Xidorn Quan <xidorn-webkit>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: megan_gardner, mmaxfield, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
testcase none

Description Xidorn Quan 2019-06-16 20:20:37 PDT
Created attachment 372230 [details]
testcase

Steps to reproduce:
1. open the testcase on iOS Safari
2. try to select different parts of the text and move the caret

Expected result:
the caret and selection area should be rotated as the text, and the caret can be moved along the rotated direction

Actual result:
the caret and selection area are still vertical, and the caret is hard to move.


The testcase uses 45deg. It would even be worse if the rotation is changed to 90deg.
Comment 1 Xidorn Quan 2019-06-16 21:03:35 PDT
Related bug reports:
* Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1559739
* Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=974617
Comment 2 Radar WebKit Bug Importer 2019-06-17 01:38:23 PDT
<rdar://problem/51797960>
Comment 3 Simon Fraser (smfr) 2019-06-17 10:41:47 PDT
How common is editing rotated text? Was this a bug on a real site?
Comment 4 Xidorn Quan 2019-06-17 21:41:07 PDT
> How common is editing rotated text? Was this a bug on a real site?

This is a bug on real site. We (Canva) allows users to rotate text in their designs.

Our native mobile app tries to undo the rotation during editing in order to work around similar bug on native platforms. When we are porting things to web, we hit the same problem here.

We don't currently have data about how frequent our users rotate text, and edit after the text is rotated.

My personal guess would be that, moderate degrees (30°, 45°, etc.) may not be very common, but there may be more people who want to rotate ±90° so that horizontal text becomes vertical. This is unfortunately the worst case on iOS at the moment. I don't have any data to back that either, though.