You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can use`mouse.onclick`to handle the click and make the mouse "moveable" with`position:fixed`, then`mouse.onkeydown`to handle arrow keys.
2
+
Kita bisa gunakan`mouse.onclick`untuk menghandle klik dan membuat mouse "moveable/bergerak" dengan`position:fixed`, kemudian`mouse.onkeydown`untuk handle tombol panah.
3
3
4
-
The only pitfall is that `keydown`only triggers on elements with focus. So we need to add`tabindex`to the element. As we're forbidden to change HTML, we can use`mouse.tabIndex`property for that.
4
+
Satu-satunya jebakan ialah `keydown`hanya trigger pada elemen dengan fokus. Jadi kita perlu untuk menambahkan`tabindex`pada elemen. Karena kita dilarang mengubah HTML, kita bisa gunakan`mouse.tabIndex`properti untuk itu.
5
5
6
-
P.S. We also can replace`mouse.onclick`with`mouse.onfocus`.
6
+
P.S. Kita juga bisa ganti`mouse.onclick`dengan`mouse.onfocus`.
0 commit comments