File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ import './Search.scss';
1717 class =" search-trigger"
1818 aria-label =" Search documentation"
1919 title =" Search (Ctrl+K)"
20- commandfor =" search-dialog"
21- command =" show-modal"
2220>
2321 <igc-icon name =" search" collection =" docs" aria-hidden =" true" ></igc-icon>
2422 <span class =" search-trigger__label" >Search</span >
@@ -128,13 +126,8 @@ import './Search.scss';
128126 }
129127 updateSearchHint();
130128
131- // Declarative show-modal via commandfor fires a `command` event on the dialog —
132- // use it to load page find and focus the input.
133- document.addEventListener('command', async (e: Event) => {
134- const ce = e as CommandEvent;
135- if (ce.target instanceof HTMLDialogElement && ce.target.id === 'search-dialog') {
136- await loadAndMountPagefind();
137- }
129+ document.getElementById('search-trigger')?.addEventListener('click', () => {
130+ openSearch();
138131 });
139132
140133 // Keyboard shortcut
You can’t perform that action at this time.
0 commit comments