File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ export default class Dom {
146
146
public click ( element : HTMLElement ) : void {
147
147
this . triggerEvent ( element , 'mousedown' )
148
148
this . triggerEvent ( element , 'mouseup' )
149
- element . click ( )
150
149
element . focus ( )
150
+ element . click ( )
151
151
}
152
152
153
153
public querySelectorAll ( element : HTMLElement , selector : string , { visibleOnly = true } = { } ) : HTMLElement [ ] {
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ describe('dom', () => {
158
158
const events = [ ]
159
159
const checkbox = assembly . insertHtml ( '<input type="checkbox"/>' )
160
160
161
- ; [ 'mousedown' , 'mouseup' , 'click' ] . forEach ( type => {
161
+ ; [ 'mousedown' , 'mouseup' , 'click' , 'focusin' ] . forEach ( type => {
162
162
checkbox . addEventListener ( type , ( ) => events . push ( type ) )
163
163
} )
164
164
@@ -167,7 +167,8 @@ describe('dom', () => {
167
167
expect ( events ) . to . eql ( [
168
168
'mousedown' ,
169
169
'mouseup' ,
170
- 'click'
170
+ 'focusin' ,
171
+ 'click' ,
171
172
] )
172
173
173
174
expect ( checkbox . checked ) . to . equal ( true )
You can’t perform that action at this time.
0 commit comments