From f9db469920068097c5d5843d5e95dbf37e53ff40 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Fri, 28 Jun 2024 22:35:35 +0200 Subject: [PATCH] IMPR: Get rid from extra clicks --- package.json | 2 +- src/js/ui/dropdown.js | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/package.json b/package.json index ee7c866..8b171b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react", - "version": "5.4.2", + "version": "5.4.3", "description": "This UI Kit allows you to build Bootstrap 5 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.", "author": "Tony Air ", "license": "BSD-2-Clause", diff --git a/src/js/ui/dropdown.js b/src/js/ui/dropdown.js index 176cbc8..f43171d 100644 --- a/src/js/ui/dropdown.js +++ b/src/js/ui/dropdown.js @@ -149,34 +149,7 @@ const DropdownHoverUI = ((window) => { console.log(`${NAME}: click`) - // nav second click - if (href && el.dataset.firstClick) { - console.log(`${NAME}: nav second click`) - - e.stopImmediatePropagation() - if (typeof window.app === 'undefined' || typeof window.app.Router === 'undefined') { - window.location.href = href - return - } - - window.app.Router.openURL(href) - } - - if (parent) { - // big screen click - if (href && window.innerWidth > 768 && parent.classList.contains('active-dropdown')) { - console.log(`${NAME}: big screen | nav click the dropdown is shown already`) - - e.stopImmediatePropagation() - if (typeof window.app === 'undefined' || typeof window.app.Router === 'undefined') { - window.location.href = href - return - } - - window.app.Router.openURL(href) - } - Toggle(parent) }