Commit 427d05b
fix(search): autocomplete suggestions and Enter key now deliver results (#59)
* fix(search): make suggestions and Enter key trigger results
- onSelect with item.url: use SPA loadContent() instead of window.location.href to avoid a full-page reload
- onSelect without item.url: call performSearch() so the selected suggestion actually highlights matches in the current chapter
- Add onSubmit handler so pressing Enter in the autocomplete input triggers performSearch()
Co-authored-by: danmunz <282860+danmunz@users.noreply.github.com>
* fix(search): configure local algolia env & replace production urls with local origins
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: danmunz <282860+danmunz@users.noreply.github.com>
Co-authored-by: aih <arihershowitz@gmail.com>1 parent 4421899 commit 427d05b
3 files changed
+88
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
| |||
1850 | 1865 | | |
1851 | 1866 | | |
1852 | 1867 | | |
1853 | | - | |
1854 | 1868 | | |
1855 | | - | |
| 1869 | + | |
1856 | 1870 | | |
1857 | 1871 | | |
1858 | 1872 | | |
1859 | | - | |
1860 | | - | |
| 1873 | + | |
| 1874 | + | |
1861 | 1875 | | |
1862 | | - | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1863 | 1884 | | |
1864 | 1885 | | |
1865 | 1886 | | |
1866 | 1887 | | |
1867 | 1888 | | |
1868 | 1889 | | |
1869 | 1890 | | |
1870 | | - | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1874 | 1895 | | |
1875 | 1896 | | |
1876 | 1897 | | |
1877 | 1898 | | |
1878 | 1899 | | |
1879 | 1900 | | |
1880 | 1901 | | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1881 | 1907 | | |
1882 | 1908 | | |
1883 | 1909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments