We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d5ab6e commit e049fb2Copy full SHA for e049fb2
bottomfloat.js
@@ -120,19 +120,13 @@ if (isMobile) {
120
// update on screen resize
121
122
bottomWrapper.style.setProperty('--window-height', window.innerHeight + 'px');
123
-
124
- bottomWrapper.lastHeight = 0;
125
126
- window.addEventListener('resize', () => {
127
128
- if (bottomWrapper.lastHeight === window.innerHeight) {
129
- return;
130
- }
131
132
- bottomWrapper.lastHeight = window.innerHeight;
+
+ const portrait = window.matchMedia('(orientation: portrait)');
+ portrait.addEventListener('change', (event) => {
133
134
135
136
});
137
138
}
0 commit comments