Skip to content

Commit

Permalink
Fix enter key on ime completion triggering blur
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Nov 9, 2023
1 parent 814e23c commit 7a04c73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/js/beatmaps/search-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class SearchPanel extends React.Component<Props> {
this.controller.filters.update('query', this.query);
};

private readonly onKeyUp = (event: React.KeyboardEvent<HTMLInputElement>) => {
private readonly onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === 'Enter') {
htmlElementOrNull(event.target)?.blur();
}
Expand Down Expand Up @@ -160,7 +160,7 @@ export class SearchPanel extends React.Component<Props> {
className='beatmapsets-search__input js-beatmapsets-search-input'
name='search'
onChange={this.onChange}
onKeyUp={this.onKeyUp}
onKeyDown={this.onKeyDown}
placeholder={trans('beatmaps.listing.search.prompt')}
type='search'
value={this.query}
Expand Down Expand Up @@ -192,7 +192,7 @@ export class SearchPanel extends React.Component<Props> {
className='beatmapsets-search__input js-beatmapsets-search-input'
name='search'
onChange={this.onChange}
onKeyUp={this.onKeyUp}
onKeyDown={this.onKeyDown}
placeholder={trans('beatmaps.listing.search.prompt')}
type='search'
value={this.query}
Expand Down

0 comments on commit 7a04c73

Please sign in to comment.