vira 28.19.0 → 28.19.1

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.
@@ -93,6 +93,21 @@ 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;
101
+ const isTextInput = (target instanceof HTMLInputElement &&
102
+ (target.type === 'text' ||
103
+ target.type === 'search' ||
104
+ target.type === 'email' ||
105
+ target.type === 'url' ||
106
+ target.type === 'tel' ||
107
+ target.type === 'password' ||
108
+ target.type === 'number')) ||
109
+ target instanceof HTMLTextAreaElement ||
110
+ (target instanceof HTMLElement && target.isContentEditable);
96
111
  if (keyCode === 'ArrowDown') {
97
112
  event.stopImmediatePropagation();
98
113
  event.preventDefault();
@@ -110,20 +125,26 @@ export class PopUpManager {
110
125
  });
111
126
  }
112
127
  else if (keyCode === 'ArrowLeft') {
113
- event.stopImmediatePropagation();
114
- event.preventDefault();
115
- this.navController.navigate({
116
- direction: NavDirection.Left,
117
- allowWrapping: false,
118
- });
128
+ /** Allow left arrow in text inputs for cursor navigation. */
129
+ if (!isTextInput) {
130
+ event.stopImmediatePropagation();
131
+ event.preventDefault();
132
+ this.navController.navigate({
133
+ direction: NavDirection.Left,
134
+ allowWrapping: false,
135
+ });
136
+ }
119
137
  }
120
138
  else if (keyCode === 'ArrowRight') {
121
- event.stopImmediatePropagation();
122
- event.preventDefault();
123
- this.navController.navigate({
124
- direction: NavDirection.Right,
125
- allowWrapping: false,
126
- });
139
+ /** Allow right arrow in text inputs for cursor navigation. */
140
+ if (!isTextInput) {
141
+ event.stopImmediatePropagation();
142
+ event.preventDefault();
143
+ this.navController.navigate({
144
+ direction: NavDirection.Right,
145
+ allowWrapping: false,
146
+ });
147
+ }
127
148
  }
128
149
  else if ((keyCode === 'Enter' || keyCode === 'Return' || keyCode === 'Space') &&
129
150
  this.navController.enterInto({ fallbackToActivate: true }).success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "28.19.0",
3
+ "version": "28.19.1",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",