Bug 228645

Summary: White-space in span element with inline-block style gets eaten-up in innerText and clipboard text
Product: WebKit Reporter: sukii <skvenkat>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: karlcow, rniwa, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
A sample showing the white-space bug none

Description sukii 2021-07-30 08:28:58 PDT
Created attachment 434631 [details]
A sample showing the white-space bug

Unlike Firefox browser, all the Webkit browsers seem to eat-up white-space in span tag if it carries a inline-block style.

<div><span>Hello</span><span style="display:inline-block; width:10px;"> </span><span>World!</span></div>
Comment 1 sukii 2021-07-30 08:34:03 PDT
The white-space shows-up fine in the browser view, but disappears from the clipboard selection and from the innerText property, whereas it shows-up fine in innerHTML property.
Comment 2 Radar WebKit Bug Importer 2021-08-06 08:29:16 PDT
<rdar://problem/81618283>
Comment 3 Karl Dubost 2024-06-10 05:42:45 PDT
Safari Tech Preview: HelloWorld!    (Release 196 (Safari 17.4, WebKit 619.1.16))
Chrome Canary:       HelloWorld!    (Version 127.0.6522.0)
Firefox Nightly :    Hello World!   (128.0a1 (2024-06-05))