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:
Emmanuel Pelletier
2024-06-21 14:17:35 +02:00
parent 62b74a5445
commit 862d475f15

View File

@@ -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(() => {