File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ const metadata = {
195
195
* Indicates if the element if focusable
196
196
* @private
197
197
*/
198
- nonFocusable : {
198
+ nonInteractive : {
199
199
type : Boolean ,
200
200
} ,
201
201
@@ -333,6 +333,9 @@ class Button extends UI5Element {
333
333
}
334
334
335
335
_onclick ( event ) {
336
+ if ( this . nonInteractive ) {
337
+ return ;
338
+ }
336
339
event . isMarked = "button" ;
337
340
const FormSupport = getFeature ( "FormSupport" ) ;
338
341
if ( FormSupport ) {
@@ -341,6 +344,9 @@ class Button extends UI5Element {
341
344
}
342
345
343
346
_onmousedown ( event ) {
347
+ if ( this . nonInteractive ) {
348
+ return ;
349
+ }
344
350
event . isMarked = "button" ;
345
351
this . active = true ;
346
352
activeButton = this ; // eslint-disable-line
@@ -365,11 +371,18 @@ class Button extends UI5Element {
365
371
}
366
372
367
373
_onfocusout ( _event ) {
374
+ if ( this . nonInteractive ) {
375
+ return ;
376
+ }
368
377
this . active = false ;
369
378
this . focused = false ;
370
379
}
371
380
372
381
_onfocusin ( event ) {
382
+ if ( this . nonInteractive ) {
383
+ return ;
384
+ }
385
+
373
386
event . isMarked = "button" ;
374
387
this . focused = true ;
375
388
}
@@ -417,7 +430,7 @@ class Button extends UI5Element {
417
430
return tabindex ;
418
431
}
419
432
420
- return this . nonFocusable ? "-1" : this . _tabIndex ;
433
+ return this . nonInteractive ? "-1" : this . _tabIndex ;
421
434
}
422
435
423
436
get showIconTooltip ( ) {
Original file line number Diff line number Diff line change 61
61
line-height : inherit;
62
62
}
63
63
64
- : host (: not ([active ]): hover ),
64
+ : host (: not ([active ]): not ([ non-interactive ]) : hover ),
65
65
: host (: not ([hidden ]).ui5_hovered ) {
66
66
background : var (--sapButton_Hover_Background );
67
67
}
You can’t perform that action at this time.
0 commit comments