Skip to content

Commit b59ce5f

Browse files
authored
fix: scrollbars & block/inline:center, safari & window scrolling with custom behavior and bundlesize reduction (#319)
* Remove visualViewport stuff Revisit if necessary * Run chrome on browserstack * run tests on electron * how about now * visualViewport is required to not break pinch-zooming * try chrome again * ok we have to use chrome for now * quick test * simplify viewport logic * micro optim not worth it * retry * unnecessary check removed * refactor looping logic * refactor out viewport file * prepare more optimization in main loop * optimize further by alloc vars * reveeeeert * reduce canOverflow overhead * remove duplicate logic * shadow doom * fix shadowdom * TS error * This needs to be refined * Ensure scrolling happens within bounds * Better scrollbar support * fix border test * cleanup logic * cleaner * Test a switch case * Revert "Test a switch case" This reverts commit e3619d7. * unify logic flow * unifying more logic * optimize further * simplify and minimize even more * reduce test count to avoid hitting bs limit * swap map to for loop * optimize if-needed logic * quick test * measure size in a more predictable way * small test * another small size test * replace property accessors * shave off a few more bytes * ok one more * ok don't break IE
1 parent 50d637b commit b59ce5f

File tree

8 files changed

+234
-228
lines changed

8 files changed

+234
-228
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ es
2020
umd
2121
/compute.js
2222
/index.js
23-
/types.js
24-
/viewport.js
23+
/types.js

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"compute.js",
1616
"es",
1717
"typings",
18-
"umd",
19-
"viewport.js"
18+
"umd"
2019
],
2120
"scripts": {
2221
"prebuild": "yarn clean",
@@ -86,7 +85,7 @@
8685
"bundlesize": [
8786
{
8887
"path": "./umd/scroll-into-view-if-needed.min.js",
89-
"maxSize": "4 kB",
88+
"maxSize": "3 kB",
9089
"compression": "none"
9190
}
9291
],

0 commit comments

Comments
 (0)