mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
recent_topics: Focus on search box on t keypress.
This commit is contained in:
@@ -477,6 +477,7 @@ exports.process_hotkey = function (e, hotkey) {
|
|||||||
case "vim_right":
|
case "vim_right":
|
||||||
case "tab":
|
case "tab":
|
||||||
case "shift_tab":
|
case "shift_tab":
|
||||||
|
case "open_recent_topics":
|
||||||
if (
|
if (
|
||||||
["#recent_topics", "#", ""].includes(window.location.hash) &&
|
["#recent_topics", "#", ""].includes(window.location.hash) &&
|
||||||
!popovers.any_active() &&
|
!popovers.any_active() &&
|
||||||
|
|||||||
@@ -600,6 +600,9 @@ exports.change_focused_element = function (e, input_key) {
|
|||||||
// wraparound. Going off the top or the bottom takes one
|
// wraparound. Going off the top or the bottom takes one
|
||||||
// to the navigation at the top (see set_table_focus).
|
// to the navigation at the top (see set_table_focus).
|
||||||
switch (input_key) {
|
switch (input_key) {
|
||||||
|
case "open_recent_topics":
|
||||||
|
set_default_focus();
|
||||||
|
return true;
|
||||||
case "shift_tab":
|
case "shift_tab":
|
||||||
case "vim_left":
|
case "vim_left":
|
||||||
case "left_arrow":
|
case "left_arrow":
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{> recent_topics_filters}}
|
{{> recent_topics_filters}}
|
||||||
</div>
|
</div>
|
||||||
<div class="search_group" role="group">
|
<div class="search_group" role="group">
|
||||||
<input type="text" id="recent_topics_search" value="{{ search_val }}" placeholder="{{t 'Search stream / topic' }}">
|
<input type="text" id="recent_topics_search" value="{{ search_val }}" placeholder="{{t 'Search stream / topic (t)' }}">
|
||||||
<button type="button" class="btn clear_search_button" id="recent_topics_search_clear">
|
<button type="button" class="btn clear_search_button" id="recent_topics_search_clear">
|
||||||
<i class="fa fa-remove" aria-hidden="true"></i>
|
<i class="fa fa-remove" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -243,6 +243,10 @@
|
|||||||
<td class="definition">{% trans %}View recent topics{% endtrans %}</td>
|
<td class="definition">{% trans %}View recent topics{% endtrans %}</td>
|
||||||
<td><span class="hotkey"><kbd>T</kbd> or <kbd>Esc</kbd> or <kbd>Ctrl</kbd> + <kbd>[</kbd></span></td>
|
<td><span class="hotkey"><kbd>T</kbd> or <kbd>Esc</kbd> or <kbd>Ctrl</kbd> + <kbd>[</kbd></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="definition">{% trans %}Search recent topics{% endtrans %}</td>
|
||||||
|
<td><span class="hotkey"><kbd>T</kbd></span></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ title="thumbs up"/>**: `+`
|
|||||||
## Recent topics
|
## Recent topics
|
||||||
|
|
||||||
* **View recent topics**: `t` or `Esc` or `Ctrl` + `[`
|
* **View recent topics**: `t` or `Esc` or `Ctrl` + `[`
|
||||||
|
* **Search recent topics**: `t`
|
||||||
|
|
||||||
Keyboard navigation (e.g. arrow keys) works as expected.
|
Keyboard navigation (e.g. arrow keys) works as expected.
|
||||||
Use `Enter` to engage with elements.
|
Use `Enter` to engage with elements.
|
||||||
|
|||||||
Reference in New Issue
Block a user