@vaadin/field-highlighter 24.0.0-alpha1 → 24.0.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/field-highlighter",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,29 +34,29 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "24.0.0-
|
|
38
|
-
"@vaadin/overlay": "24.0.0-
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
40
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
37
|
+
"@vaadin/component-base": "24.0.0-alpha2",
|
|
38
|
+
"@vaadin/overlay": "24.0.0-alpha2",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha2",
|
|
42
42
|
"lit": "^2.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
|
-
"@vaadin/checkbox": "24.0.0-
|
|
47
|
-
"@vaadin/checkbox-group": "24.0.0-
|
|
48
|
-
"@vaadin/combo-box": "24.0.0-
|
|
49
|
-
"@vaadin/date-picker": "24.0.0-
|
|
50
|
-
"@vaadin/date-time-picker": "24.0.0-
|
|
51
|
-
"@vaadin/item": "24.0.0-
|
|
52
|
-
"@vaadin/list-box": "24.0.0-
|
|
53
|
-
"@vaadin/radio-group": "24.0.0-
|
|
54
|
-
"@vaadin/select": "24.0.0-
|
|
46
|
+
"@vaadin/checkbox": "24.0.0-alpha2",
|
|
47
|
+
"@vaadin/checkbox-group": "24.0.0-alpha2",
|
|
48
|
+
"@vaadin/combo-box": "24.0.0-alpha2",
|
|
49
|
+
"@vaadin/date-picker": "24.0.0-alpha2",
|
|
50
|
+
"@vaadin/date-time-picker": "24.0.0-alpha2",
|
|
51
|
+
"@vaadin/item": "24.0.0-alpha2",
|
|
52
|
+
"@vaadin/list-box": "24.0.0-alpha2",
|
|
53
|
+
"@vaadin/radio-group": "24.0.0-alpha2",
|
|
54
|
+
"@vaadin/select": "24.0.0-alpha2",
|
|
55
55
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
56
|
-
"@vaadin/text-area": "24.0.0-
|
|
57
|
-
"@vaadin/text-field": "24.0.0-
|
|
58
|
-
"@vaadin/time-picker": "24.0.0-
|
|
56
|
+
"@vaadin/text-area": "24.0.0-alpha2",
|
|
57
|
+
"@vaadin/text-field": "24.0.0-alpha2",
|
|
58
|
+
"@vaadin/time-picker": "24.0.0-alpha2",
|
|
59
59
|
"sinon": "^13.0.2"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "0c16c01a6807e629a84f5a982793afecc1a7ced0"
|
|
62
62
|
}
|
|
@@ -36,15 +36,19 @@ export class DatePickerObserver extends ComponentObserver {
|
|
|
36
36
|
datePicker.addEventListener('focusout', (event) => this.onFocusOut(event));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
isEventInOverlay(node) {
|
|
40
|
+
return this.datePicker._overlayContent && this.datePicker._overlayContent.contains(node);
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
onBlur(event) {
|
|
40
44
|
const datePicker = this.datePicker;
|
|
41
|
-
if (datePicker._fullscreen && event.relatedTarget
|
|
45
|
+
if (datePicker._fullscreen && !this.isEventInOverlay(event.relatedTarget)) {
|
|
42
46
|
this.fullscreenFocus = true;
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
onFocusIn(event) {
|
|
47
|
-
if (event.relatedTarget
|
|
51
|
+
if (this.isEventInOverlay(event.relatedTarget)) {
|
|
48
52
|
// Focus returns from the overlay, do nothing.
|
|
49
53
|
return;
|
|
50
54
|
}
|
|
@@ -59,7 +63,7 @@ export class DatePickerObserver extends ComponentObserver {
|
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
onFocusOut(event) {
|
|
62
|
-
if (this.fullscreenFocus || event.relatedTarget
|
|
66
|
+
if (this.fullscreenFocus || this.isEventInOverlay(event.relatedTarget)) {
|
|
63
67
|
// Do nothing, overlay is opening.
|
|
64
68
|
} else if (!this.datePicker.opened) {
|
|
65
69
|
// Field blur when closed.
|