WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
215094
Setting a value for cursor interferes with a child's overflow-wrap value
https://bugs.webkit.org/show_bug.cgi?id=215094
Summary
Setting a value for cursor interferes with a child's overflow-wrap value
Palmer Mebane
Reported
2020-08-03 12:29:18 PDT
An outer div specifying cursor: pointer causes a div inside of it to not apply an overflow-wrap property. Here is a way to reproduce the issue. HTML: <div class="wrapbox"> abcdefghijklmnopqrstuvwxyz </div> <div class="cursor"> <div class="wrapbox"> abcdefghijklmnopqrstuvwxyz </div> </div> CSS: .wrapbox { border: 1px solid red; margin: 4px; padding: 4px; width: 100px; overflow-wrap: break-word; } .cursor { cursor: pointer; } (This can be previewed at this jsfiddle:
https://jsfiddle.net/qc90bm6x/1/
) On Chrome and Firefox, the top and bottom box both wrap the text into two lines. On Safari 13.1, the top box wraps the text. But the bottom box does not wrap and allows the text to overflow. This bottom box not wrapping is the unexpected behavior that this bug is about. If one uses Safari's inspect element on the bottom box to look at computed styles, the computed overflow-wrap style is "normal". Expanding the list of rules that led to that style shows that .wrapbox wants to set the value to "break-word", and it somehow just doesn't get set. A workaround is to set overflow-wrap: break-word; on the div with cursor: pointer. This suffices for both the repro above and the real situation where we encountered this.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-08-04 17:22:05 PDT
<
rdar://problem/66550142
>
Simon Fraser (smfr)
Comment 2
2020-08-04 19:54:00 PDT
Weird!
Simon Fraser (smfr)
Comment 3
2020-08-04 20:01:27 PDT
This is something about style sharing and inherited properties.
Simon Fraser (smfr)
Comment 4
2020-08-04 20:03:35 PDT
This might also be triggered by interaction with the deprecated "word-wrap" property.
Ahmad Saleem
Comment 5
2022-09-30 16:01:34 PDT
I am not able to reproduce this bug in Safari 16 using JSFiddle from
Comment 0
and the bottom box does not overflow and show similar rendering to "Chrome Canary 108" and "Firefox Nightly 107". I am marking this as "RESOLVED CONFIGURATION CHANGED" but if it is reproducible then please reopen with updated testcase. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug