Skip to content

Commit 49a483a

Browse files
Update solution.md
1 parent 36fd6b7 commit 49a483a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • 2-ui/4-forms-controls/2-focus-blur/5-keyboard-mouse
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+
ما می‌توانیم برای هندل کردن click از `mouse.onclick` استفاده کنیم و برای قابل حرکت دادن کردن mouse از `position:fixed` استفاده کنیم، سپس `mouse.onkeydown` برای هندل کردن کلید‌های جهت‌دار.
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+
تنها مشکل این است که `keydown` فقط روی elementهایی که focus دارند فعال می‌شود. پس باید `tabindex` را به element اضافه کنیم. چون اجازه نداریم که HTML را تغییر دهیم، می‌توانیم برای آن از `mouse.tabIndex` استفاده کنیم.
55

6-
P.S. We also can replace `mouse.onclick` with `mouse.onfocus`.
6+
پی‌نوشت: همچنین می‌توانیم `mouse.onclick` را با `mouse.onfocus` جایگزین کنیم.

0 commit comments

Comments
 (0)