Skip to content

Commit adc8ce6

Browse files
committed
fix(prompter): Broken scroll to top
1 parent 89723bd commit adc8ce6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/webui/src/client/ui/Prompter/controller/joycon-device.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class JoyConController extends ControllerAbstract {
126126
break
127127
case '2':
128128
// go to top
129-
window.scrollTo(0, 0)
129+
window.scrollTo({ top: 0, behavior: 'instant' })
130130
break
131131
case '3':
132132
// go to following
@@ -152,7 +152,7 @@ export class JoyConController extends ControllerAbstract {
152152
break
153153
case '1':
154154
// go to top
155-
window.scrollTo(0, 0)
155+
window.scrollTo({ top: 0, behavior: 'instant' })
156156
break
157157
case '0':
158158
// go to following
@@ -183,7 +183,7 @@ export class JoyConController extends ControllerAbstract {
183183
case '12':
184184
case '3':
185185
// go to top
186-
window.scrollTo(0, 0)
186+
window.scrollTo({ top: 0, behavior: 'instant' })
187187
break
188188
case '15':
189189
case '1':

packages/webui/src/client/ui/Prompter/controller/shuttle-keyboard-device.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class ShuttleKeyboardController extends ControllerAbstract {
117117
// jump to top
118118
this.lastSpeed = 0
119119
this.lastSpeedMapPosition = ShuttleKeyboardController.SPEEDMAPNEUTRALPOSITION
120-
window.scrollTo(0, 0)
120+
window.scrollTo({ top: 0, behavior: 'instant' })
121121
return
122122
case 'F11':
123123
// jump to live

0 commit comments

Comments
 (0)