Summary: | Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bburg, commit-queue, graouts, hello, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
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 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. Created attachment 261819 [details]
patch
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.
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() Created attachment 261832 [details]
Patch
Comment on attachment 261832 [details] Patch Clearing flags on attachment: 261832 Committed r190285: <http://trac.webkit.org/changeset/190285> All reviewed patches have been landed. Closing bug. |
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.