| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Adopted theme search fields opened the dialog on focus. Closing a dialog restores focus to the element that opened it, so Escape and backdrop clicks reopened it immediately and left no way out. Open on click and on Enter or Space instead. Chrome's `<input type=search>` consumes the first Escape to clear the field, so closing took two presses despite the `Esc` hint. Close the dialog explicitly. Record urls are relative to the documentation root but were used verbatim as hrefs, so every result 404'd from a page below the root. Resolve them against the root as the index loads. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #7 +/- ##
==========================================
+ Coverage 94.80% 95.12% +0.31%
==========================================
Files 3 3
Lines 154 164 +10
Branches 10 10
==========================================
+ Hits 146 156 +10
Misses 4 4
Partials 4 4 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Four fixes to the search dialog, all reproducible on the deployed yardang docs.
The dialog could not be dismissed. Adopted theme search fields opened it on focus. Closing a dialog restores focus to the element that opened it, so Escape and backdrop clicks reopened it immediately, with no way out. It now opens on click and on Enter or Space, so focus restoration is harmless. This is what made click-away appear broken as well.
Escape needed two presses. Chrome's <input type=search> consumes the first Escape to clear the field, so the Esc hint in the panel was misleading. The dialog now closes on Escape explicitly.
Selecting the query dismissed the dialog. A click whose press landed inside the panel still targets the dialog on release, so dragging past the field's edge to select the query closed it and discarded the search. Click-away now requires the press to have landed on the backdrop too.
Every result 404'd below the documentation root. Records store urls relative to the root but they were used verbatim as hrefs, so from /docs/src/overview.html a result for docs/src/configuration.html resolved to /docs/src/docs/src/configuration.html. Urls are now resolved against the root as the index loads. Fixing it in the engine rather than the dialog means any UI built on SearchLite gets it, including the one in sphinx-fuma.
Checked in Chromium against the live docs with the patched scripts swapped in, at the site root, at /docs/src/overview.html, and under /_previews/klink/ where the documentation root is itself a subdirectory. Click-away is covered for the backdrop, the area below the panel, clicks inside the panel, and selections dragged out of it.
Type of Change
Checklist