gaufre: fix crash on safari
the popup object was always null in this case, we have to use the given element from the parameter
This commit is contained in:
@@ -183,7 +183,7 @@
|
|||||||
const showPopup = (button) => {
|
const showPopup = (button) => {
|
||||||
let popup = document.querySelector(`#lasuite-gaufre-popup`)
|
let popup = document.querySelector(`#lasuite-gaufre-popup`)
|
||||||
const show = (el) => {
|
const show = (el) => {
|
||||||
updatePopupStyle(popup, button)
|
updatePopupStyle(el, button)
|
||||||
el.classList.add("lasuite--gaufre-opened")
|
el.classList.add("lasuite--gaufre-opened")
|
||||||
lastFocusedButton = button
|
lastFocusedButton = button
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user