Skip to content

Resolved problem when opening Select2 adding scroll prevention#6370

Open
pratik916 wants to merge 2 commits into
select2:developfrom
pratik916:develop
Open

Resolved problem when opening Select2 adding scroll prevention#6370
pratik916 wants to merge 2 commits into
select2:developfrom
pratik916:develop

Conversation

@pratik916
Copy link
Copy Markdown

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
Copy Markdown
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