vira 28.19.1 → 28.19.2
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/dist/util/pop-up-manager.js +16 -23
- package/package.json +1 -1
|
@@ -93,11 +93,7 @@ export class PopUpManager {
|
|
|
93
93
|
this.removePopUp();
|
|
94
94
|
}
|
|
95
95
|
else if (this.options.supportNavigation) {
|
|
96
|
-
|
|
97
|
-
* Check if the event target is a text input element. If so, allow horizontal
|
|
98
|
-
* arrow keys to pass through for cursor navigation within the input.
|
|
99
|
-
*/
|
|
100
|
-
const target = event.target;
|
|
96
|
+
const target = event.composedPath()[0];
|
|
101
97
|
const isTextInput = (target instanceof HTMLInputElement &&
|
|
102
98
|
(target.type === 'text' ||
|
|
103
99
|
target.type === 'search' ||
|
|
@@ -108,6 +104,9 @@ export class PopUpManager {
|
|
|
108
104
|
target.type === 'number')) ||
|
|
109
105
|
target instanceof HTMLTextAreaElement ||
|
|
110
106
|
(target instanceof HTMLElement && target.isContentEditable);
|
|
107
|
+
if (isTextInput) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
111
110
|
if (keyCode === 'ArrowDown') {
|
|
112
111
|
event.stopImmediatePropagation();
|
|
113
112
|
event.preventDefault();
|
|
@@ -125,26 +124,20 @@ export class PopUpManager {
|
|
|
125
124
|
});
|
|
126
125
|
}
|
|
127
126
|
else if (keyCode === 'ArrowLeft') {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
allowWrapping: false,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
127
|
+
event.stopImmediatePropagation();
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
this.navController.navigate({
|
|
130
|
+
direction: NavDirection.Left,
|
|
131
|
+
allowWrapping: false,
|
|
132
|
+
});
|
|
137
133
|
}
|
|
138
134
|
else if (keyCode === 'ArrowRight') {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
allowWrapping: false,
|
|
146
|
-
});
|
|
147
|
-
}
|
|
135
|
+
event.stopImmediatePropagation();
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
this.navController.navigate({
|
|
138
|
+
direction: NavDirection.Right,
|
|
139
|
+
allowWrapping: false,
|
|
140
|
+
});
|
|
148
141
|
}
|
|
149
142
|
else if ((keyCode === 'Enter' || keyCode === 'Return' || keyCode === 'Space') &&
|
|
150
143
|
this.navController.enterInto({ fallbackToActivate: true }).success) {
|