fix(search): Handle touch events to prevent input blur on mobile when saving views (#1039)
On mobile devices, clicking "Save as Smart View" button caused the search input to lose focus, triggering the onBlur handler that closes the entire search menu. The existing onMouseDown preventDefault() only worked for mouse events, not touch events on mobile. Added onTouchStart handler alongside onMouseDown to properly prevent input blur on mobile devices when interacting with the search menu. Fixes #994
This commit is contained in:
parent
06527dc573
commit
d32b5943d1
1 changed files with 4 additions and 0 deletions
|
|
@ -426,6 +426,10 @@ const SearchMenu: React.FC<SearchMenuProps> = ({
|
||||||
// Prevent input blur on mobile when clicking inside the search menu
|
// Prevent input blur on mobile when clicking inside the search menu
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}}
|
}}
|
||||||
|
onTouchStart={(e) => {
|
||||||
|
// Prevent input blur on mobile when touching inside the search menu
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{/* Filter Badges Section */}
|
{/* Filter Badges Section */}
|
||||||
<div className="border-b border-gray-200 dark:border-gray-700 overflow-y-auto max-h-[40vh] md:max-h-none">
|
<div className="border-b border-gray-200 dark:border-gray-700 overflow-y-auto max-h-[40vh] md:max-h-none">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue