fix(ui): LionInputStepper focus issue
This commit is contained in:
parent
f1630c0881
commit
ea71f6194b
1 changed files with 4 additions and 1 deletions
|
|
@ -196,7 +196,10 @@ export class LionInputStepper extends LocalizeMixin(LionInput) {
|
|||
const incrementButton = this.__getSlot('suffix');
|
||||
const disableIncrementor = this.currentValue >= max && max !== Infinity;
|
||||
const disableDecrementor = this.currentValue <= min && min !== Infinity;
|
||||
if (disableDecrementor || disableIncrementor) {
|
||||
if (
|
||||
(disableDecrementor && decrementButton === document.activeElement) ||
|
||||
(disableIncrementor && incrementButton === document.activeElement)
|
||||
) {
|
||||
this._inputNode.focus();
|
||||
}
|
||||
decrementButton[disableDecrementor ? 'setAttribute' : 'removeAttribute']('disabled', 'true');
|
||||
|
|
|
|||
Loading…
Reference in a new issue