@@ -173,7 +173,7 @@ export abstract class App<TBootstrap extends Bootstrap> {
173173
174174 el . scrollIntoView ( {
175175 block : 'start' ,
176- behavior : 'instant '
176+ behavior : 'auto '
177177 } ) ;
178178 window . scrollBy ( 0 , - height ) ;
179179
@@ -223,42 +223,30 @@ export abstract class App<TBootstrap extends Bootstrap> {
223223 private bind ( ) {
224224 this . onBind ( ) ;
225225
226- const onMessageReceived = this . onMessageReceived . bind ( this ) ;
227- window . addEventListener ( 'message' , onMessageReceived ) ;
226+ window . addEventListener ( 'message' , this . onMessageReceived . bind ( this ) ) ;
227+
228+ const me = this ;
228229
229- const onInputChecked = this . onInputChecked . bind ( this ) ;
230230 DOM . listenAll ( 'input[type=checkbox].setting' , 'change' , function ( this : HTMLInputElement ) {
231- return onInputChecked ( this , ... arguments ) ;
231+ return me . onInputChecked ( this ) ;
232232 } ) ;
233-
234- const onInputBlurred = this . onInputBlurred . bind ( this ) ;
235233 DOM . listenAll ( 'input[type=text].setting, input:not([type]).setting' , 'blur' , function ( this : HTMLInputElement ) {
236- return onInputBlurred ( this , ... arguments ) ;
234+ return me . onInputBlurred ( this ) ;
237235 } ) ;
238-
239- const onInputFocused = this . onInputFocused . bind ( this ) ;
240236 DOM . listenAll ( 'input[type=text].setting, input:not([type]).setting' , 'focus' , function ( this : HTMLInputElement ) {
241- return onInputFocused ( this , ... arguments ) ;
237+ return me . onInputFocused ( this ) ;
242238 } ) ;
243-
244- const onInputSelected = this . onInputSelected . bind ( this ) ;
245- DOM . listenAll ( 'select.setting' , 'change' , function ( this : HTMLInputElement ) {
246- return onInputSelected ( this , ...arguments ) ;
239+ DOM . listenAll ( 'select.setting' , 'change' , function ( this : HTMLSelectElement ) {
240+ return me . onInputSelected ( this ) ;
247241 } ) ;
248-
249- const onTokenMouseDown = this . onTokenMouseDown . bind ( this ) ;
250- DOM . listenAll ( '[data-token]' , 'mousedown' , function ( this : HTMLElement ) {
251- return onTokenMouseDown ( this , ...arguments ) ;
242+ DOM . listenAll ( '[data-token]' , 'mousedown' , function ( this : HTMLElement , e : Event ) {
243+ return me . onTokenMouseDown ( this , e as MouseEvent ) ;
252244 } ) ;
253-
254- const onPopupMouseDown = this . onPopupMouseDown . bind ( this ) ;
255- DOM . listenAll ( '.popup' , 'mousedown' , function ( this : HTMLElement ) {
256- return onPopupMouseDown ( this , ...arguments ) ;
245+ DOM . listenAll ( '.popup' , 'mousedown' , function ( this : HTMLElement , e : Event ) {
246+ return me . onPopupMouseDown ( this , e as MouseEvent ) ;
257247 } ) ;
258-
259- const onJumpToLinkClicked = this . onJumpToLinkClicked . bind ( this ) ;
260- DOM . listenAll ( 'a.jump-to[href^="#"]' , 'click' , function ( this : HTMLAnchorElement ) {
261- return onJumpToLinkClicked ( this , ...arguments ) ;
248+ DOM . listenAll ( 'a.jump-to[href^="#"]' , 'click' , function ( this : HTMLAnchorElement , e : Event ) {
249+ return me . onJumpToLinkClicked ( this , e as MouseEvent ) ;
262250 } ) ;
263251 }
264252
0 commit comments