Skip to content

Commit

Permalink
fix: video overlay on firefox browser
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Oct 5, 2023
1 parent 0571580 commit 0e2dd00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/js/plugins/accept-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ class AcceptOverlay extends BaseComponent {
constructor(element, config) {
const parentElement = element.closest('.acceptoverlay')
super(parentElement)
this._overlayable = element.closest('.acceptoverlayable')
const remember = cookies.isChoiceRemembered(config.service)
this._isShown = true
this._toggleElement = element
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._overlayable.classList.add(CLASS_NAME_SHOW)
}
if (remember) {
this.hide()
setTimeout(() => {
Expand Down Expand Up @@ -68,6 +72,7 @@ class AcceptOverlay extends BaseComponent {
}

this._element.classList.remove(CLASS_NAME_SHOW)
this._overlayable.classList.remove(CLASS_NAME_SHOW)

this._queueCallback(() => this._hideElement(), this._element, isAnimated)
}
Expand All @@ -88,6 +93,7 @@ class AcceptOverlay extends BaseComponent {
}

this._element.classList.add(CLASS_NAME_SHOW)
this._overlayable.add(CLASS_NAME_SHOW)

const transitionComplete = () => {
this._isTransitioning = false
Expand Down
2 changes: 1 addition & 1 deletion src/scss/custom/_accept-overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.acceptoverlayable {
position: relative;
&:has(.acceptoverlay.show) {
&.show {
min-height: 450px;
}
}
Expand Down

0 comments on commit 0e2dd00

Please sign in to comment.