Bug 249712 - <html> should be focusable if document.designMode="on"
Summary: <html> should be focusable if document.designMode="on"
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-12-21 07:03 PST by Ahmad Saleem
Modified: 2023-03-10 16:20 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-12-21 07:03:36 PST
Hi Team,

While going through Blink's commits, I found another one which we can merge:

Blink Commit - https://chromium.googlesource.com/chromium/src.git/+/2e0b14d5b60afe239324c9c986745bec7f294ece

Webkit Source - https://searchfox.org/wubkat/source/Source/WebCore/dom/Element.cpp#378

^ In above add this:

|| isRootEditableElement();

https://searchfox.org/wubkat/source/Source/WebCore/dom/Node.cpp#1376

Only issue that don't have testcase.

Thanks!
Comment 1 Ahmad Saleem 2022-12-21 07:07:07 PST
NOTE - Safari 16.2 matches Firefox Nightly 111 and don't have "Editable Head" as editable as of right now, on following test case:

data:text/html;charset=utf-8,<html><head><style>*%20{%20display:block;%20}</style><title>Editable%20HEAD</title></head><body>body<script>document.designMode="on"</script>

^ From Chrome Bug.
Comment 2 Radar WebKit Bug Importer 2022-12-28 07:04:19 PST
<rdar://problem/103742741>
Comment 3 Ahmad Saleem 2023-03-10 16:20:03 PST
My approach to add || isRootEditableElement(); in bool Element::supportsFocus() function does not make 'head' editable from Comment 01 test case.

Just wanted to update since I tested this in local test environment.