mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
fix(path-input): added e.stopPropagation() to ensure the parent modal does not close when the search is active and the ESC key is pressed
This commit is contained in:
@@ -226,6 +226,7 @@ function PathInput({
|
|||||||
// Close search with Escape key
|
// Close search with Escape key
|
||||||
if (e.key === 'Escape' && isSearchOpen) {
|
if (e.key === 'Escape' && isSearchOpen) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
e.stopPropagation(); // Stop propagation so parent modal doesn't close
|
||||||
setIsSearchOpen(false);
|
setIsSearchOpen(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user