mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 06:33:27 +08:00
fix: search box animating on small screen (#4076)
This commit is contained in:
parent
ea9b059f70
commit
e030c1ee8c
|
@ -96,7 +96,10 @@ export default abstract class AbstractSearch<T extends SearchAttrs = SearchAttrs
|
|||
};
|
||||
|
||||
return (
|
||||
<div role="search" className="Search" aria-label={this.attrs.a11yRoleLabel}>
|
||||
<div role="search" className="Search" aria-label={this.attrs.a11yRoleLabel} onclick={() => {
|
||||
this.$('input').blur();
|
||||
setTimeout(() => openSearchModal(), 150);
|
||||
}}>
|
||||
<Input
|
||||
type="search"
|
||||
className="Search-input"
|
||||
|
@ -112,7 +115,6 @@ export default abstract class AbstractSearch<T extends SearchAttrs = SearchAttrs
|
|||
else this.searchState.setValue(value);
|
||||
}}
|
||||
inputAttrs={{
|
||||
onclick: () => setTimeout(() => openSearchModal(), 150),
|
||||
// for keyboard navigation, click event would be triggered on keydown
|
||||
onkeydown: (e: KeyboardEvent) => {
|
||||
if (e.key === 'Enter') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user