File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 4
4
@mouseout =" {{ _onmouseout }} "
5
5
@focusin =" {{ _onfocusin }} "
6
6
@focusout =" {{ _onfocusout }} "
7
+ @keydown =" {{ _onkeydown }} "
8
+ @keyup =" {{ _onkeyup }} "
7
9
>
8
10
<div class =" ui5-file-uploader-mask" >
9
11
{{ #unless hideInput }}
Original file line number Diff line number Diff line change 6
6
fetchI18nBundle ,
7
7
getI18nBundle ,
8
8
} from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
9
+ import { isEnter , isSpace } from "@ui5/webcomponents-base/dist/Keys.js" ;
9
10
import {
10
11
FILEUPLOAD_BROWSE ,
11
12
FILEUPLOADER_TITLE ,
@@ -284,6 +285,18 @@ class FileUploader extends UI5Element {
284
285
} ) ;
285
286
}
286
287
288
+ _onkeydown ( event ) {
289
+ if ( isEnter ( event ) ) {
290
+ this . _input . click ( event ) ;
291
+ }
292
+ }
293
+
294
+ _onkeyup ( event ) {
295
+ if ( isSpace ( event ) ) {
296
+ this . _input . click ( event ) ;
297
+ }
298
+ }
299
+
287
300
_onfocusin ( ) {
288
301
this . focused = true ;
289
302
}
You can’t perform that action at this time.
0 commit comments