[Webkit-unassigned] [Bug 215094] New: Setting a value for cursor interferes with a child's overflow-wrap value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 3 12:29:18 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=215094
Bug ID: 215094
Summary: Setting a value for cursor interferes with a child's
overflow-wrap value
Product: WebKit
Version: Safari 13
Hardware: Macintosh
OS: macOS 10.13
Status: NEW
Severity: Minor
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: pm20200803 at gmail.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200803/7d667031/attachment-0001.htm>
More information about the webkit-unassigned
mailing list