WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207248
[Web Inspector][WinCairo] Selecting an error message in Console causes "TypeError: selection.focusNode.closest is not a function."
https://bugs.webkit.org/show_bug.cgi?id=207248
Summary
[Web Inspector][WinCairo] Selecting an error message in Console causes "TypeE...
Fujii Hironori
Reported
2020-02-04 20:09:29 PST
[Web Inspector][WinCairo] The error "TypeError: selection.focusNode.closest is not a function." happens by selecting an error message I tested with WinCairo WK2, trunk,
r255482
. 1. Start MiniBrowser 2. Open Web Inspector 3. Open Console Tab 4. Enter "foo" 5. An error message "ReferenceError: Can't find variable: foo" is output 6. Press left mouse button on the string of the error message 6. Drug the mouse 7. "TypeError: selection.focusNode.closest is not a function." happens These uncaught exceptions caused the problem: TypeError: selection.focusNode.closest is not a function. (In 'selection.focusNode.closest("." + WI.LogContentView.ItemWrapperStyleClassName)', 'selection.focusNode.closest' is undefined) (at LogContentView.js:552:54) _mousemove @ LogContentView.js:552:54 handleEvent @ LogContentView.js:653:28 I don't see this issue in Mac port.
Attachments
Patch
(2.20 KB, patch)
2020-02-06 02:46 PST
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch for landing
(2.21 KB, patch)
2020-02-06 17:56 PST
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Stephan Szabo
Comment 1
2020-02-04 21:02:33 PST
Hmm, Devin Rousso seems to have reported similar for mac at
https://bugs.webkit.org/show_bug.cgi?id=198594
Fujii Hironori
Comment 2
2020-02-04 21:59:45 PST
Looks a same issue. Thanks. But surprisingly Mac port doesn't reproduce the issue even this
Bug 198594
's test case on my Mac. 🤔
Fujii Hironori
Comment 3
2020-02-06 02:20:13 PST
selection.focusNode is a Text node at the time. closest is a method of Element.
Fujii Hironori
Comment 4
2020-02-06 02:40:27 PST
The code was added by
r242174
(
Bug 173747
).
Fujii Hironori
Comment 5
2020-02-06 02:46:43 PST
Created
attachment 389941
[details]
Patch
Devin Rousso
Comment 6
2020-02-06 09:24:24 PST
Comment on
attachment 389941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389941&action=review
r=me
> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:552 > + var focusElement = selection.focusNode;
Style: we prefer using `let`
Fujii Hironori
Comment 7
2020-02-06 17:56:14 PST
Created
attachment 390037
[details]
Patch for landing Thank you for the reveiw.
Fujii Hironori
Comment 8
2020-02-06 19:48:13 PST
Committed
r256006
: <
https://trac.webkit.org/changeset/256006
>
Radar WebKit Bug Importer
Comment 9
2020-02-06 19:49:13 PST
<
rdar://problem/59249046
>
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