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

Do not apply any styles when the scrolltrack is not visible at all #49

Open
itbra opened this issue Jan 28, 2015 · 0 comments
Open

Do not apply any styles when the scrolltrack is not visible at all #49

itbra opened this issue Jan 28, 2015 · 0 comments

Comments

@itbra
Copy link

itbra commented Jan 28, 2015

In some cases the target element does not overflow and thus not require to be scrollable and show the scrollbar. In this case the plugin should not apply any width, padding and such to not take away the space it would normally take from the target element.
If you calculate whether the scrollbar should be visible or not just do not set any styles instead of setting its display attribute to 'none'.

Also, i'd suggest to add some class indicating whether the target element is scrollable or not like jquery ui does with datepicker inputs. All the datepickable elements receive a class 'datepicker' indicating the element's capability.

Adopting this concept to your plugin would allow for style overrides to elements that are intended to be scrollable but do not (yet) overflow.

itbra added a commit to itbra/enscroll that referenced this issue Jan 28, 2015
Fix as described here [jstoudt#49
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

No branches or pull requests

1 participant