WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201128
InputEvent.inputType is null when triggering Bold/Italic/Underline using execCommand
https://bugs.webkit.org/show_bug.cgi?id=201128
Summary
InputEvent.inputType is null when triggering Bold/Italic/Underline using exec...
Wenson Hsieh
Reported
2019-08-25 14:50:02 PDT
To reproduce: 1. Go to
https://whsieh.github.io/examples/input-events
2. Focus the richly editable area and type a few characters 3. Select all 4. Enter `document.execCommand("bold", true)` in Web Inspector. Expected: the input event’s inputType should be formatBold. Observed: it’s null instead. Additional notes: this is inconsistent with how the inputType attribute is nonnull when using execCommand to insert or delete text.
Attachments
expected behavior (via context menu)
(2.82 MB, image/png)
2022-10-09 12:27 PDT
,
Wenson Hsieh
no flags
Details
observed behavior (via execCommand)
(2.42 MB, image/png)
2022-10-09 12:27 PDT
,
Wenson Hsieh
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-10-08 12:11:22 PDT
I am not able to reproduce this in Safari Technology Preview 155 and it makes the text bold and show "true" in console. Similar to Chrome Canary 108. Only Firefox Nightly 107 is which shows "false" and does not bold text. Appreciate if someone can confirm, else I am happy to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!
Wenson Hsieh
Comment 2
2022-10-09 12:26:08 PDT
(In reply to Ahmad Saleem from
comment #1
)
> I am not able to reproduce this in Safari Technology Preview 155 and it > makes the text bold and show "true" in console. Similar to Chrome Canary > 108. Only Firefox Nightly 107 is which shows "false" and does not bold text. > > Appreciate if someone can confirm, else I am happy to mark this as "RESOLVED > CONFIGURATION CHANGED". Thanks!
Hm...this still reproduces for me on STP 155 (testing against macOS Monterey 12.5.1). The inputType attribute returns an empty string for me when programmatically executing the Bold command, whereas it's (correctly) "formatBold" when using the context menu (Right click > Font > Bold).
Wenson Hsieh
Comment 3
2022-10-09 12:27:15 PDT
Created
attachment 462898
[details]
expected behavior (via context menu)
Wenson Hsieh
Comment 4
2022-10-09 12:27:50 PDT
Created
attachment 462899
[details]
observed behavior (via execCommand)
Ahmad Saleem
Comment 5
2022-10-09 12:37:44 PDT
(In reply to Wenson Hsieh from
comment #2
)
> (In reply to Ahmad Saleem from
comment #1
) > > I am not able to reproduce this in Safari Technology Preview 155 and it > > makes the text bold and show "true" in console. Similar to Chrome Canary > > 108. Only Firefox Nightly 107 is which shows "false" and does not bold text. > > > > Appreciate if someone can confirm, else I am happy to mark this as "RESOLVED > > CONFIGURATION CHANGED". Thanks! > > Hm...this still reproduces for me on STP 155 (testing against macOS Monterey > 12.5.1). > > The inputType attribute returns an empty string for me when programmatically > executing the Bold command, whereas it's (correctly) "formatBold" when using > the context menu (Right click > Font > Bold).
My bad - I tested it wrong and didn't look into those logs but on console logs only. Thanks!
Ryosuke Niwa
Comment 6
2022-10-09 16:35:12 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/5173
EWS
Comment 7
2022-10-09 20:46:40 PDT
Committed
255331@main
(233ca3659280): <
https://commits.webkit.org/255331@main
> Reviewed commits have been landed. Closing PR #5173 and removing active labels.
Radar WebKit Bug Importer
Comment 8
2022-10-09 20:47:19 PDT
<
rdar://problem/100960295
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug