Bug 228859 - caret-color does not work on first click in ios
Summary: caret-color does not work on first click in ios
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-06 02:08 PDT by Rostislav Shtanko
Modified: 2021-08-09 07:56 PDT (History)
6 users (show)

See Also:


Attachments
example of invalid caret color (3.05 MB, image/gif)
2021-08-06 02:27 PDT, Rostislav Shtanko
no flags Details
Patch (20.10 KB, patch)
2021-08-08 15:28 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rostislav Shtanko 2021-08-06 02:08:25 PDT
Hello!
I faced a problem with CSS in ios 13 - custom caret color, which can be defined by caret-color style is not working on first browser load. https://developer.mozilla.org/en-US/docs/Web/CSS/caret-color
I provided an example in the attachment. 
This problem can be reproduced at least in ios 13.3, ios 13.6, and in ios 14.2 (browsers: safari, google chrome). In the example, I'm using an ios simulator, but actually, the problem is the same on real devices. 
IOS Version in the example is 13.3.
Comment 1 Rostislav Shtanko 2021-08-06 02:27:19 PDT
Created attachment 435059 [details]
example of invalid caret color
Comment 2 Wenson Hsieh 2021-08-07 12:52:34 PDT
This doesn't reproduce for me on iOS 15 (I tested iPhone w/ software keyboard and iPad with hardware keyboard).
Comment 3 Wenson Hsieh 2021-08-07 12:57:13 PDT
(In reply to Wenson Hsieh from comment #2)
> This doesn't reproduce for me on iOS 15 (I tested iPhone w/ software
> keyboard and iPad with hardware keyboard).

Never mind, I'm able to reproduce now — this only happens if I focus the input field right after backgrounding Safari and bringing it to the foreground again.
Comment 4 Radar WebKit Bug Importer 2021-08-08 14:36:10 PDT
<rdar://problem/81674787>
Comment 5 Wenson Hsieh 2021-08-08 15:28:01 PDT
Created attachment 435159 [details]
Patch
Comment 6 Wenson Hsieh 2021-08-08 18:16:33 PDT
Comment on attachment 435159 [details]
Patch

Thanks for the review!
Comment 7 EWS 2021-08-08 18:21:48 PDT
Committed r280767 (240352@main): <https://commits.webkit.org/240352@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435159 [details].
Comment 8 Rostislav Shtanko 2021-08-09 00:58:01 PDT
Thank you for the patch. Is it possible to use it in my safari 13 (ios 13)?
Comment 9 Wenson Hsieh 2021-08-09 07:56:30 PDT
(In reply to Rostislav Shtanko from comment #8)
> Thank you for the patch. Is it possible to use it in my safari 13 (ios 13)?

Unfortunately, not on iOS 13. I will leave an update when this fix makes it into a beta release of iOS — thank you for your patience!