Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HFP-3610 Do not change element position if already in dropzone #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

otacke
Copy link
Contributor

@otacke otacke commented Oct 21, 2022

When merged in, placing a draggable inside a dropbox using the "select" logic is ignored if the element is already inside the dropbox.

Currently it is possible that by accident a dropped item is auto-aligned in a dropzone that should not auto-align. Please compare the report at https://h5p.org/comment/47251.

This can happen if you

  1. drop an element in a dropzone, then
  2. select the element using a click without dragging and then
  3. select the dropbox.

The keyboard select-function is triggered which will always auto-align items. I assume this is a side effect to the recent changes of drag detection (or has always been the case :-)).

By only placing a draggable inside a dropbox using the "select" logic if the element is not already inside the dropbox, the issue can be fixed while the rest of the behavior stays the same.

@otacke otacke changed the title Do not change element position if already in dropzone HFP-3610 Do not change element position if already in dropzone Oct 21, 2022
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.

None yet

1 participant