Skip to content

Commit b68bdfb

Browse files
Update solution.md
1 parent aa41f27 commit b68bdfb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • 2-ui/4-forms-controls/2-focus-blur/5-keyboard-mouse

2-ui/4-forms-controls/2-focus-blur/5-keyboard-mouse/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
ما می‌توانیم برای هندل کردن click از `mouse.onclick` استفاده کنیم و برای قابل حرکت دادن کردن mouse، از `position:fixed` استفاده کنیم، سپس `mouse.onkeydown` برای هندل کردن کلید‌های جهت‌دار.
2+
ما می‌توانیم برای هندل کردن click از `mouse.onclick`، برای قابل حرکت دادن mouse از `position:fixed` و سپس از `mouse.onkeydown` برای هندل کردن کلید‌های جهت‌دار استفاده کنیم.
33

44
تنها مشکل این است که `keydown` فقط روی elementهایی که focus دارند فعال می‌شود. پس باید `tabindex` را به element اضافه کنیم. چون اجازه نداریم که HTML را تغییر دهیم، می‌توانیم برای آن از `mouse.tabIndex` استفاده کنیم.
55

0 commit comments

Comments
 (0)