mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Fix focus bug in filter menu
Summary: It was impossible to focus the search input in the filter menu if either of the range filter inputs were focused. Test Plan: Browser test. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3942
This commit is contained in:
parent
d5fe26f63c
commit
271a5735c3
@ -470,9 +470,13 @@ function numericInput(obs: Observable<number|undefined|IRelativeDateSpec>,
|
|||||||
editMode = false;
|
editMode = false;
|
||||||
inputEl.value = formatValue(obs.get());
|
inputEl.value = formatValue(obs.get());
|
||||||
|
|
||||||
// Make sure focus is trapped on input during calendar view, so that uses can still use keyboard
|
setTimeout(() => {
|
||||||
// to navigate relative date options just after picking a date on the calendar.
|
// Make sure focus is trapped on input during calendar view, so that uses can still use keyboard
|
||||||
setTimeout(() => opts.isSelected.get() && inputEl.focus());
|
// to navigate relative date options just after picking a date on the calendar.
|
||||||
|
if (opts.viewTypeObs.get() === 'calendarView' && opts.isSelected.get()) {
|
||||||
|
inputEl.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const onInput = debounce(() => {
|
const onInput = debounce(() => {
|
||||||
if (isRelativeBound(obs.get())) { return; }
|
if (isRelativeBound(obs.get())) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user