Skip to content

Commit b3db6c8

Browse files
committed
fix: reposition the current session on resizing
1 parent 40889ef commit b3db6c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

assets/script/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ var result = document.querySelector('body > main > section#result');
88

99

1010
var currentTarget = type;
11+
window.onresize = () => {
12+
13+
currentTarget.scrollIntoView({
14+
behavior: 'smooth'
15+
});
16+
17+
};
1118

1219

1320
for (let checkBox of type.querySelectorAll('form > div > label > input')) {

0 commit comments

Comments
 (0)