mirror of
https://github.com/modrinth/code.git
synced 2026-09-04 05:48:57 +00:00
fix: clear button, page scroll, and metadata loading state
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
@focusin="handleSearchFocus"
|
||||
@focusout="handleSearchFocusout"
|
||||
@click="handleSearchClick"
|
||||
@clear="handleSearchInput"
|
||||
@clear="handleSearchClear"
|
||||
>
|
||||
<template v-if="showChevron" #right>
|
||||
<ChevronLeftIcon
|
||||
@@ -842,6 +842,12 @@ function handleSearchInput() {
|
||||
}
|
||||
}
|
||||
|
||||
function handleSearchClear() {
|
||||
userHasTyped.value = true
|
||||
emit('searchInput', searchQuery.value)
|
||||
closeDropdown()
|
||||
}
|
||||
|
||||
function handleSearchFocus(event: FocusEvent) {
|
||||
const target = event.target
|
||||
if (props.selectSearchTextOnFocus && target instanceof HTMLInputElement) {
|
||||
|
||||
Reference in New Issue
Block a user