You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: