8000 Resolved problem when opening Select2 adding scroll prevention by pratik916 · Pull Request #6370 · select2/select2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Resolved problem when opening Select2 adding scroll prevention #6370

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

pratik916
Copy link

This pull request includes a

Resolved problem when opening Select2 adding scroll prevention was not being removed if runtime scroll disappear due to dom changes.

Added getter method when applying watchers and clearing them when select2 box is closed.

  • Bug fix
  • New feature
  • Translation

The following changes were made

This pull request includes changes to the src/js/select2/dropdown/attachBody.js file to improve the handling of dropdown watchers. The most important changes include the addition of methods to manage watchers and refactoring existing code to utilize these new methods.

Improvements to watcher management:

  • Added a new property this.$watchers to store watcher elements.
  • Refactored code to use a new method _getWatchers for retrieving watcher elements, replacing the previous inline implementation. [1] [2]
  • Added a new method _clearWatchers to clear the stored watchers.
  • Implemented the _getWatchers and _clearWatchers methods to manage the watcher elements more efficiently.

If this is related to an existing ticket, include a link to it as well.

…t being removed if runtime scroll disappear due to dom changes.

Added getter method when applying watchers and clearing them when select2 box is closed.

Issue refered : select2#5342
@pratik916
Copy link
Author

Resolving conflicts.

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
0