IMPR: Get rid from extra clicks

This commit is contained in:
Tony Air 2024-06-28 22:35:35 +02:00
parent c3ac192aa9
commit f9db469920
2 changed files with 1 additions and 28 deletions

View File

@ -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 <tony@twma.pro>",
"license": "BSD-2-Clause",

View File

@ -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)
}