Skip to content

Commit

Permalink
improve modal scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
yesil committed May 27, 2024
1 parent 656c333 commit c80c0e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion creativecloud/deps/merch-sidenav.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// branch: catalog-regressions-4 commit: d3bd85e73193a2d92ab306f9363c2a2cb2f0a003 Mon, 27 May 2024 12:30:54 GMT
// branch: catalog-regressions-4 commit: d3bd85e73193a2d92ab306f9363c2a2cb2f0a003 Mon, 27 May 2024 12:51:11 GMT

Check warning on line 1 in creativecloud/deps/merch-sidenav.js

View workflow job for this annotation

GitHub Actions / Running eslint

[eslint] reported by reviewdog 🐶 File ignored because of a matching ignore pattern. Use "--no-ignore" to override. Raw Output: {"fatal":false,"severity":1,"message":"File ignored because of a matching ignore pattern. Use \"--no-ignore\" to override."}

// src/sidenav/merch-sidenav.js
import { html as html4, css as css5, LitElement as LitElement4 } from "/libs/deps/lit-all.min.js";
Expand Down Expand Up @@ -382,6 +382,9 @@ var SPECTRUM_MOBILE_LANDSCAPE = "(max-width: 700px)";
var TABLET_DOWN = "(max-width: 1199px)";

// src/sidenav/merch-sidenav.js
function preventDefault(e) {
e.preventDefault();
}
var MerchSideNav = class extends LitElement4 {
static properties = {
title: { type: String },
Expand Down Expand Up @@ -509,11 +512,15 @@ var MerchSideNav = class extends LitElement4 {
overlay.addEventListener("close", () => {
document.documentElement.style.overflow = "initial";
document.documentElement.style.scrollbarGutter = "initial";
document.body.removeEventListener("touchmove", preventDefault);
this.modal = false;
});
this.shadowRoot.querySelector("sp-theme").append(overlay);
document.documentElement.style.overflow = "clip";
document.documentElement.style.scrollbarGutter = "stable";
document.body.addEventListener("touchmove", preventDefault, {
passive: false
});
});
}
updated() {
Expand Down

0 comments on commit c80c0e8

Please sign in to comment.