Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve the handling of custom scrollbars and prevent page jumping when a popup is shown. It introduces new options, refactors existing code, and updates documentation.
Enhancements and New Features:
src/configs.js
: AddedscrollbarWidth
option to allow manual setting of scrollbar width to avoid page jumping when a popup is shown.src/utils/getScrollbarWidth.js
: Implemented a new utility function to calculate scrollbar width, with support for manual override via thescrollbarWidth
option.src/utils/isMobile.js
: Added a utility function to detect mobile devices, ensuring the scrollbar width is set to0
on touch screens.Code Refactoring:
src/_index.js
: Refactored to use the newgetScrollbarWidth
utility function and moved the function import to the appropriate file. [1] [2]src/helpers.js
: Removed the oldgetScrollbarWidth
function, as it has been replaced by the new utility.Documentation Updates:
dev/md/options.md
: Updated the options documentation to include the newscrollbarWidth
attribute.dev/md/faq.md
: Added a new FAQ section explaining how to fix page jumping when a popup is shown, including examples of custom scrollbar CSS and Easy Popup options.Frontend Enhancements:
dev/index.html
: Added custom scrollbar styles for Chrome, Edge, and Safari.dev/script.js
: Updated to include the new FAQ section in the documentation. [1] [2]