Bug 248366
| Summary: | Don't inherit block style if text is inserted after paragraph selection | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | karlcow, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
I was not able to find this bug and Safari 16.1 and Technology Preview 158 both are failing this test while Firefox as well.
Test Case Failing - https://jsfiddle.net/epsyfc2q/show
Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=170157
Webkit GitHub Source - https://github.com/WebKit/WebKit/blob/65da5f9b2e68fb35c7e4e43b77281d005180d4ce/Source/WebCore/editing/DeleteSelectionCommand.cpp#L508 & https://github.com/WebKit/WebKit/blob/65da5f9b2e68fb35c7e4e43b77281d005180d4ce/Source/WebCore/editing/InsertTextCommand.cpp#LL144
Just want to raise this bug for future so if needed, this can be fixed.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
fwiw, the test is failing everywhere.
WebKit:
```
FAIL container.innerHTML should be <p style="text-indent: 3em;"><span>aBar</span></p>. Was <p style="text-indent: 0px;"><span>aBar</span></p>.
```
Gecko:
```
TEST COMPLETE
FAIL container.innerHTML should be <p style="text-indent: 3em;"><span>aBar</span></p>. Was <p>a</p><p style="text-indent: 3em;"><span>Bar</span></p>.
```
Blink:
```
PASS container.innerHTML is "<p style=\"text-indent: 3em;\"><span>aBar</span></p>"
```
Radar WebKit Bug Importer
<rdar://problem/102701248>
Karl Dubost
(In reply to Karl Dubost from comment #1)
> fwiw, the test is failing everywhere.
doh! The test is failing only in Gecko and WebKit and differently.