Skip to content

Prevent selection when Select is disabled before release - #136

Open
Xapollon430 wants to merge 1 commit into
nextcloud-libraries:mainfrom
Xapollon430:fix/nextcloud-select-disabled-before-release
Open

Xapollon430 wants to merge 1 commit into
nextcloud-libraries:mainfrom
Xapollon430:fix/nextcloud-select-disabled-before-release

Conversation

@Xapollon430

Copy link
Copy Markdown

Problem

  1. Open a Select with Apple selected.
  2. Press and hold the mouse button on Orange.
  3. Set disabled to true, then release the mouse button.

Orange becomes selected and update:modelValue fires even though the component is disabled when the click completes. A pending option press keeps the dropdown open through the input's blur event.

Watch the browser reproduction.

The Chromium recording uses the library's stylesheet and ordinary pointer input. It shows the same press and release on original and fixed Nextcloud Vue Select source. The app owns the value; the component owns the open state.

Check the current disabled prop before selecting an option or firing selection events. This is the same guard proposed for the Vue 2 upstream in sagalbot#1883, verified separately against this maintained Vue 3 fork.

Validation

  • All 196 tests pass across 22 files. The new regression fails before the fix.
  • Production build and scoped lint pass. Existing lint warnings remain.
  • Before: Apple changes to Orange and one update fires. After: Apple stays selected and zero updates fire.

AI-assisted implementation and testing.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant