mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 02:19:43 +00:00
Close dialog when clicked on link (#16690)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export const isNavigationClick = (e: MouseEvent) => {
|
||||
export const isNavigationClick = (e: MouseEvent, preventDefault = true) => {
|
||||
// Taken from polymer/pwa-helpers. BSD-3 licensed
|
||||
if (
|
||||
e.defaultPrevented ||
|
||||
@@ -40,6 +40,8 @@ export const isNavigationClick = (e: MouseEvent) => {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
if (preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
return href;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user