mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPR: Get rid from extra clicks
This commit is contained in:
parent
c3ac192aa9
commit
f9db469920
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react",
|
"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.",
|
"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>",
|
"author": "Tony Air <tony@twma.pro>",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
|
@ -149,34 +149,7 @@ const DropdownHoverUI = ((window) => {
|
|||||||
|
|
||||||
console.log(`${NAME}: click`)
|
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) {
|
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)
|
Toggle(parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user