RESOLVED FIXED 149223
Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret
https://bugs.webkit.org/show_bug.cgi?id=149223
Summary Web Inspector: search shortcut in split console moves focus to search box, bu...
Blaze Burg
Reported 2015-09-16 10:52:26 PDT
Created attachment 261320 [details] video of repro STEPS TO REPRODUCE: * Open split console (ESC) * Click in the quick console, type stuff * Use find shortcut (CMD+F) EXPECTED: * Search box should be lit up and have blinking caret ACTUAL: * Search box is lit up, but has no caret.
Attachments
video of repro (5.55 MB, video/quicktime)
2015-09-16 10:52 PDT, Blaze Burg
no flags
patch (19.68 KB, patch)
2015-09-23 05:28 PDT, João Oliveira
no flags
Patch (1.75 KB, patch)
2015-09-23 11:11 PDT, João Oliveira
no flags
Radar WebKit Bug Importer
Comment 1 2015-09-16 10:53:04 PDT
João Oliveira
Comment 2 2015-09-22 10:55:29 PDT
this bug is also reproducible on the main console tab, and even when nothing is typed on the quick console, when the find shortcut (CMD+F) is pressed, the carret fails to move to the search bar
João Oliveira
Comment 3 2015-09-23 05:11:17 PDT
the previous comment behaviour happens only when text is typed on the search box and then cleared, after that search box no longer gains focus when pressing CMD+F, so: STEPS TO REPRODUCE: * Click in the console tab * Use find shortcut (CMD+F) * type stuff on the searchbox * clear text written * Use find shortcut (CMD+F) EXPECTED: * Search box should be lit up and have blinking caret ACTUAL: * Search box is lit up, but has no caret.
João Oliveira
Comment 4 2015-09-23 05:28:53 PDT
Blaze Burg
Comment 5 2015-09-23 09:41:36 PDT
Comment on attachment 261819 [details] patch Hi, please re-upload without whitespace changes to the changelog. You may need to change your editor settings to be less aggressive.
Joseph Pecoraro
Comment 6 2015-09-23 09:56:31 PDT
Comment on attachment 261819 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=261819&action=review r- just to see a new version of the patch. > Source/WebInspectorUI/ChangeLog:9 > + When pressing console find shortcut (CMD+F) SearchBar now checks if there's text on _searchInput > + if so text is selected, if the textbox is empty, textbox gains focus Nit: End in a period. > Source/WebInspectorUI/ChangeLog:150 > - is selected and not updating focused element. > + is selected and not updating focused element. You should drop all the whitespace changes below your additions at the top. > Source/WebInspectorUI/UserInterface/Views/SearchBar.js:64 > + if (this._searchInput.value.length == 0) Style: We use `===` where possible, but in the case of 0 we would just use `!`. E.g. "if (!this._searchInput.value.length)" > Source/WebInspectorUI/UserInterface/Views/SearchBar.js:67 > + this._searchInput.focus(); > + else > + this._searchInput.select(); So it turns out that this is an engine bug. Calling select in this case should show the caret and isn't. I'd prefer if there was a comment here that we are working around a WebKit bug. I filed one, so you can add: // FIXME: Workaround for: <https://webkit.org/b/149504> Caret missing from <input> after clearing text and calling select()
João Oliveira
Comment 7 2015-09-23 11:11:31 PDT
WebKit Commit Bot
Comment 8 2015-09-28 14:45:05 PDT
Comment on attachment 261832 [details] Patch Clearing flags on attachment: 261832 Committed r190285: <http://trac.webkit.org/changeset/190285>
WebKit Commit Bot
Comment 9 2015-09-28 14:45:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.