Skip to content

Commit 969f1dd

Browse files
authored
Menerjemahkan solution.md --2-focus-blur/5-keyboard-mouse
1 parent 2408fdb commit 969f1dd

File tree

1 file changed

+3
-3
lines changed
  • 2-ui/4-forms-controls/2-focus-blur/5-keyboard-mouse

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
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.
33

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.
55

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

Comments
 (0)