Skip to content

Commit 39ee7b5

Browse files
committed
fix: fix tab issue when used inside ConfirmDialog
Related to vaadin-component-factory/vcf-date-range-picker-flow#19
1 parent 7cd2ddf commit 39ee7b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vcf-date-range-picker-mixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ export const DateRangePickerMixin = (subclass) =>
12161216
}
12171217
break;
12181218
case 'tab':
1219-
if (document.activeElement === this && this.shadowRoot.activeElement === this._inputStartElement)
1219+
if (this.shadowRoot.activeElement === this._inputStartElement)
12201220
{
12211221
if (e.shiftKey) {
12221222
this.close();
@@ -1230,7 +1230,7 @@ export const DateRangePickerMixin = (subclass) =>
12301230
this._selectingStartDate=false;
12311231
this._inputEndElement.focus();
12321232
}
1233-
} else if (document.activeElement === this && this.shadowRoot.activeElement === this._inputEndElement) {
1233+
} else if (this.shadowRoot.activeElement === this._inputEndElement) {
12341234
if (e.shiftKey) {
12351235
const endParsedDate = this._getParsedDate(this._inputEndValue);
12361236
if (this._isValidDate(endParsedDate)) {

0 commit comments

Comments
 (0)