File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 44 @mouseout =" {{ _onmouseout }} "
55 @focusin =" {{ _onfocusin }} "
66 @focusout =" {{ _onfocusout }} "
7+ @keydown =" {{ _onkeydown }} "
8+ @keyup =" {{ _onkeyup }} "
79>
810 <div class =" ui5-file-uploader-mask" >
911 {{ #unless hideInput }}
Original file line number Diff line number Diff line change 66 fetchI18nBundle ,
77 getI18nBundle ,
88} from "@ui5/webcomponents-base/dist/i18nBundle.js" ;
9+ import { isEnter , isSpace } from "@ui5/webcomponents-base/dist/Keys.js" ;
910import {
1011 FILEUPLOAD_BROWSE ,
1112 FILEUPLOADER_TITLE ,
@@ -284,6 +285,18 @@ class FileUploader extends UI5Element {
284285 } ) ;
285286 }
286287
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+
287300 _onfocusin ( ) {
288301 this . focused = true ;
289302 }
You can’t perform that action at this time.
0 commit comments