feat: add /
as a navigation shortcut for search (#1838)
`/` is a well-known vi/vim key-binding for search. It is supported by Firefox for a 'quick find' feature in addition to the main find feature available with the Ctrl+F key combination. DuckDuckGo also supports the key to focus the search bar as well. Signed-off-by: shine <4771718+shinenelson@users.noreply.github.com>
This commit is contained in:
parent
cc8c605828
commit
c86d2b5088
|
@ -5,7 +5,7 @@
|
|||
<Shortcut key="g n" on:pressed="goto('/notifications')"/>
|
||||
<Shortcut key="g c" on:pressed="goto('/community')"/>
|
||||
<Shortcut key="g d" on:pressed="goto('/direct')"/>
|
||||
<Shortcut key="s" on:pressed="goto('/search')"/>
|
||||
<Shortcut key="s|/" on:pressed="goto('/search')"/>
|
||||
<Shortcut key="h|?" on:pressed="showShortcutHelpDialog()"/>
|
||||
<Shortcut key="c|7" on:pressed="showComposeDialog()"/>
|
||||
{#if !$leftRightChangesFocus}
|
||||
|
|
|
@ -60,6 +60,14 @@ test('Shortcut s goes to the search page', async t => {
|
|||
.expect(getUrl()).contains('/search')
|
||||
})
|
||||
|
||||
test('Shortcut / goes to the search page', async t => {
|
||||
await loginAsFoobar(t)
|
||||
await t
|
||||
.expect(getUrl()).eql('http://localhost:4002/')
|
||||
.pressKey('/')
|
||||
.expect(getUrl()).contains('/search')
|
||||
})
|
||||
|
||||
test('Shortcut backspace goes back from favorites', async t => {
|
||||
await loginAsFoobar(t)
|
||||
await t
|
||||
|
|
Loading…
Reference in a new issue