Bug 228645 - White-space in span element with inline-block style gets eaten-up in innerText and clipboard text
Summary: White-space in span element with inline-block style gets eaten-up in innerTex...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2021-07-30 08:28 PDT by sukii
Modified: 2024-06-10 05:42 PDT (History)
5 users (show)

See Also:


Attachments
A sample showing the white-space bug (266 bytes, text/html)
2021-07-30 08:28 PDT, sukii
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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))