Skip to content

Follow up IME option creation and delete dialog timing fixes#3185

Open
don9x2E wants to merge 3 commits intonextcloud:mainfrom
don9x2E:fix/ime-option-creation-followup
Open

Follow up IME option creation and delete dialog timing fixes#3185
don9x2E wants to merge 3 commits intonextcloud:mainfrom
don9x2E:fix/ime-option-creation-followup

Conversation

@don9x2E
Copy link
Contributor

@don9x2E don9x2E commented Feb 26, 2026

Summary

Follow-up fixes after #3183 to address remaining real-world Korean IME issues and related UX regressions.

  • Prevent unintended option creation while IME composition is active
  • Local "Add a new answer option" row now creates only on explicit intent:
    • Enter after composition end, or
    • explicit + button click
  • Keep live update behavior for already-created options
  • After creating an option with Enter, move focus to the next empty local option row
  • Fix delayed "Delete form" confirmation dialog by rendering dialog outside the actions slot

Why this follow-up is needed

The initial IME patch improved composition handling, but in actual Korean IME use there were still edge cases where input-driven side effects could trigger option creation timing unexpectedly.

Switching local-row creation to explicit intent removes those composition timing race paths while preserving normal editing for existing options.

Trade-off

Auto-create-on-input for the local empty row is intentionally disabled for now to prioritize deterministic IME-safe behavior.

Validation

  • IME composition does not auto-create options
  • Exactly one option is created on explicit Enter/click
  • Focus advances to the next empty local row after creation
  • Delete-form confirmation opens immediately on click

The previous IME fix still allowed option-creation side effects from input events and did not fully protect Enter-driven actions during composition.

This change switches local option creation to explicit user intent (Enter or add button after composition), keeps updates for existing options, and guards Enter/delete handlers with composition checks.

It also moves focus to the next empty local option after creating one, and renders the delete-form confirmation dialog outside the actions slot so it opens immediately when clicked.

Signed-off-by: don9x2E <revan@kakao.com>
- format AppNavigationForm.vue to satisfy prettier/eslint CI

- register IconPlus in AnswerInput components used by explicit add button

- update IME playwright test to assert explicit Enter intent before option creation

Signed-off-by: don9x2E <revan@kakao.com>
Copy link
Collaborator

@Chartman123 Chartman123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some small comments :)

<NcButton
:aria-label="t('forms', 'Add a new answer option')"
variant="tertiary"
:disabled="isIMEComposing || !canCreateLocalAnswer"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you disable the button if we're not in an active IME composition? I think the button should also work for direct text inputs...

@Chartman123 Chartman123 requested a review from susnux February 27, 2026 12:39
@Chartman123 Chartman123 added bug Something isn't working enhancement New feature or request javascript Javascript related ticket 3. to review Waiting for reviews feature: 📑 form creation labels Feb 27, 2026
@don9x2E
Copy link
Contributor Author

don9x2E commented Feb 27, 2026

Thanks for the review!

  • I’ll move the AppNavigationForm.vue formatting change into a separate PR that references Delete form only possible by super weird, click order #3099.

  • I’ll update the add option button to be disabled only during active IME composition (so it works for direct inputs).

  • I’ll add the missing JSDoc blocks for the new handlers.

  • I’ll push the follow-up updates shortly.

Signed-off-by: don9x2E <revan@kakao.com>
@don9x2E don9x2E force-pushed the fix/ime-option-creation-followup branch from cf90b95 to 972f2ae Compare February 27, 2026 13:35
@Chartman123
Copy link
Collaborator

@don9x2E now the button is always enabled, even if there's no input at all. 😉

@susnux Can't we get rid of the debounce logic for onInput if we only submit the new options upon pressing enter or clicking the button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working enhancement New feature or request feature: 📑 form creation javascript Javascript related ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants