Commit 0e4adf0
committed
fix(ui-modal,ui-dom-utils): fix Modal focus trap broken when it has a scrollbar
The issue was that its not recognized by findFocusable as a focusable element. Recently browsers
have made scrollable elements focusable, but there is no sure way to know that a scrollbar is
displayed, an easy workaround is to add the tabIndex=0 prop. Note that this breaks VoiceOver a bit,
its not able to navigate the inside of a scrollable container with SR focus
INSTUI-46251 parent 78ef567 commit 0e4adf0
File tree
3 files changed
+27
-26
lines changed- packages
- ui-dom-utils/src
- ui-modal/src/Modal/ModalBody
3 files changed
+27
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
53 | 66 | | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
| |||
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
84 | | - | |
| 80 | + | |
85 | 81 | | |
0 commit comments