fix(gui): prevent find mode persistence when reopening omnibox with Ctrl+L
- commit
- 2619383bcf47a9718702743f5dd2e248caf73224
- author
- bamen · · 2025-09-15 08:41 UTC
- parent
- 650deb5
- signature
- unsigned
2 files · +8 -1
M CHANGELOG.md +1 -0
| @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. | |||
| 26 | 26 | - **State persistence**: Proper cleanup when switching between Ctrl+L and Ctrl+F modes | |
| 27 | 27 | - **Homepage protocol**: Fixed dumb://homepage not working after GUI migration with proper Svelte 5 component and API integration | |
| 28 | 28 | - **Omnibox positioning on homepage**: Fixed omnibox stuck in top-left corner by isolating homepage CSS styles and strengthening omnibox positioning with explicit fixed positioning and CSS isolation | |
| 29 | + | - **Find mode persistence**: Fixed find view persisting after pressing Esc when reopening with Ctrl+L by ensuring toggle() resets mode to 'omnibox' | |
| 29 | 30 | ||
| 30 | 31 | ## [0.7.0] - 2025-09-14 | |
| 31 | 32 | ||
| @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. | |||||
| 26 | - **State persistence**: Proper cleanup when switching between Ctrl+L and Ctrl+F modes | 26 | - **State persistence**: Proper cleanup when switching between Ctrl+L and Ctrl+F modes | ||
| 27 | - **Homepage protocol**: Fixed dumb://homepage not working after GUI migration with proper Svelte 5 component and API integration | 27 | - **Homepage protocol**: Fixed dumb://homepage not working after GUI migration with proper Svelte 5 component and API integration | ||
| 28 | - **Omnibox positioning on homepage**: Fixed omnibox stuck in top-left corner by isolating homepage CSS styles and strengthening omnibox positioning with explicit fixed positioning and CSS isolation | 28 | - **Omnibox positioning on homepage**: Fixed omnibox stuck in top-left corner by isolating homepage CSS styles and strengthening omnibox positioning with explicit fixed positioning and CSS isolation | ||
| 29 | + | - **Find mode persistence**: Fixed find view persisting after pressing Esc when reopening with Ctrl+L by ensuring toggle() resets mode to 'omnibox' | |||
| 29 | 30 | ||||
| 30 | ## [0.7.0] - 2025-09-14 | 31 | ## [0.7.0] - 2025-09-14 | ||
| 31 | 32 | ||||
M gui/src/components/omnibox/stores.svelte.ts +7 -1
| @@ -142,7 +142,13 @@ export const omniboxStore = { | |||
| 142 | 142 | }, | |
| 143 | 143 | ||
| 144 | 144 | toggle() { | |
| 145 | - | this.setVisible(!visible); | |
| 145 | + | if (!visible) { | |
| 146 | + | // When opening via toggle (Ctrl+L), always open in omnibox mode | |
| 147 | + | this.setMode('omnibox'); | |
| 148 | + | this.setVisible(true); | |
| 149 | + | } else { | |
| 150 | + | this.setVisible(false); | |
| 151 | + | } | |
| 146 | 152 | }, | |
| 147 | 153 | ||
| 148 | 154 | updateSuggestions(newSuggestions: Suggestion[]) { | |
| @@ -142,7 +142,13 @@ export const omniboxStore = { | |||||
| 142 | }, | 142 | }, | ||
| 143 | 143 | ||||
| 144 | toggle() { | 144 | toggle() { | ||
| 145 | - | this.setVisible(!visible); | 145 | + | if (!visible) { |
| 146 | + | // When opening via toggle (Ctrl+L), always open in omnibox mode | |||
| 147 | + | this.setMode('omnibox'); | |||
| 148 | + | this.setVisible(true); | |||
| 149 | + | } else { | |||
| 150 | + | this.setVisible(false); | |||
| 151 | + | } | |||
| 146 | }, | 152 | }, | ||
| 147 | 153 | ||||
| 148 | updateSuggestions(newSuggestions: Suggestion[]) { | 154 | updateSuggestions(newSuggestions: Suggestion[]) { | ||