Skip to content

Commit 2a6bf41

Browse files
committed
feat: scope section route
1 parent 5c09c3c commit 2a6bf41

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

assets/script/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,22 @@ scope.querySelector('form').scope.oninput = function() {
114114

115115
small.innerHTML = this.value.length +' / '+ this.maxLength;
116116

117+
};
118+
scope.querySelector('form').onsubmit = function(e) { e.preventDefault();
119+
120+
summary.querySelector('form').summary.parentNode.click();
121+
122+
currentTarget = summary;
123+
summary.scrollIntoView({
124+
behavior: 'smooth'
125+
});
126+
127+
};
128+
scope.querySelector('form').onreset = function() {
129+
130+
currentTarget = type;
131+
type.scrollIntoView({
132+
behavior: 'smooth'
133+
});
134+
117135
};

0 commit comments

Comments
 (0)