@dreki-gg/pi-questionnaire 0.2.3 → 0.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @dreki-gg/pi-questionnaire
2
2
 
3
+ ## 0.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`54e5fd9`](https://github.com/dreki-gg/pi-extensions/commit/54e5fd9b15573fd4729f89ed85e31cd4648cb6c8) Thanks [@jalbarrang](https://github.com/jalbarrang)! - fix(questionnaire): prevent navigation keys from interrupting "Other" text input
8
+
9
+ When typing custom text in the "Other" input field, keys like Space, Left/Right arrows, and 'r' were intercepted by tab navigation handlers instead of being sent to the text editor. This caused accidental tab switches that cleared the input mode and lost any typed text.
10
+
3
11
  ## 0.2.3
4
12
 
5
13
  ### Patch Changes
@@ -221,8 +221,13 @@ export async function runQuestionnaireUI(
221
221
  }
222
222
 
223
223
  function handleInput(data: string) {
224
- if (uiState.inputMode === 'otherInput' && matchesKey(data, Key.escape)) {
225
- clearInputMode();
224
+ if (uiState.inputMode === 'otherInput') {
225
+ if (matchesKey(data, Key.escape)) {
226
+ clearInputMode();
227
+ invalidate();
228
+ return;
229
+ }
230
+ editor.handleInput(data);
226
231
  invalidate();
227
232
  return;
228
233
  }
@@ -242,12 +247,6 @@ export async function runQuestionnaireUI(
242
247
  return;
243
248
  }
244
249
 
245
- if (uiState.inputMode === 'otherInput') {
246
- editor.handleInput(data);
247
- invalidate();
248
- return;
249
- }
250
-
251
250
  if (uiState.activeTabIndex === reviewTabIndex) {
252
251
  if (matchesKey(data, Key.up)) {
253
252
  uiState.reviewCursor = clamp(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreki-gg/pi-questionnaire",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Tool-first questionnaire flow for pi with shared tabbed TUI and custom rendering",
5
5
  "keywords": [
6
6
  "pi-package"