Skip to content

Commit

Permalink
fix(ui5-side-navigation-item): wholeItemToggleable works in Firefox (#…
Browse files Browse the repository at this point in the history
…9153)

event.pointerType is not supported in FireFox browser, therefore the
check if event is with mouse is changed to check if the action is done in desktop

Fixes: #9057
  • Loading branch information
LidiyaGeorgieva committed Jun 11, 2024
1 parent b03f70c commit 65cf1e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/fiori/src/SideNavigationItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "@ui5/webcomponents-icons/dist/navigation-down-arrow.js";
import "@ui5/webcomponents-icons/dist/circle-task-2.js";
import "@ui5/webcomponents-icons/dist/arrow-right.js";
import Icon from "@ui5/webcomponents/dist/Icon.js";
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
import type SideNavigationItemBase from "./SideNavigationItemBase.js";
import SideNavigationSelectableItemBase from "./SideNavigationSelectableItemBase.js";
import type SideNavigation from "./SideNavigation.js";
Expand Down Expand Up @@ -197,7 +198,7 @@ class SideNavigationItem extends SideNavigationSelectableItemBase {
_onclick = (e: PointerEvent) => {
if (!this.sideNavCollapsed
&& this.wholeItemToggleable
&& e.pointerType === "mouse") {
&& isDesktop()) {
e.preventDefault();
e.stopPropagation();
this.expanded = !this.expanded;
Expand Down

0 comments on commit 65cf1e1

Please sign in to comment.