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, I want my .content NOT to be positioned absolutely so that the parent shrinks. For example, imagine a modal dialog with a scroller inside that has a max-height of 500px; if the .content has only 200px, I want the modal to only occupy 200px. I'm positioning .content statically (or relatively) to make it work.
Unfortunately right: -SCROLL_WIDTH does not working on this situation, but margin-right does.
Since I'm inheriting from NanoScroller I've fixed this bug like so:
MyScroll.prototype.reset=function(){varposition=this.$content.css('position'),right;NanoScroller.prototype.reset.call(this);// Fix bug in nanoscroller because right: -SCROLL_WIDTH does// not work when positioning the content relativelyif(position==='static'||position==='relative'){right=parseInt(this.$content.css('right'),10);if(right){this.$content.css({right: '',marginRight: right});}}returnthis;};
I would have made a PR but I don't know coffee script that much.
In some cases, I want my
.content
NOT to be positioned absolutely so that the parent shrinks. For example, imagine a modal dialog with a scroller inside that has a max-height of 500px; if the.content
has only 200px, I want the modal to only occupy 200px. I'm positioning.content
statically (or relatively) to make it work.Unfortunately
right: -SCROLL_WIDTH
does not working on this situation, butmargin-right
does.Since I'm inheriting from NanoScroller I've fixed this bug like so:
I would have made a PR but I don't know coffee script that much.
//cc @kristerkari
The text was updated successfully, but these errors were encountered: