Fix a CSS bug that an unwanted scrollbar appears.
This commit is contained in:
parent
427284337f
commit
7ab6c5e5ef
@ -53,13 +53,13 @@ $ps-bar-hover: #999;
|
||||
@mixin in-scrolling {
|
||||
&.ps-in-scrolling {
|
||||
pointer-events: none;
|
||||
>.ps-scrollbar-x-rail {
|
||||
&.ps-x>.ps-scrollbar-x-rail{
|
||||
@include scrollbar-rail-hover;
|
||||
>.ps-scrollbar-x {
|
||||
@include scrollbar-hover;
|
||||
}
|
||||
}
|
||||
>.ps-scrollbar-y-rail {
|
||||
&.ps-y>.ps-scrollbar-y-rail {
|
||||
@include scrollbar-rail-hover;
|
||||
>.ps-scrollbar-y {
|
||||
@include scrollbar-hover;
|
||||
|
@ -218,6 +218,7 @@ module.exports = function (element, settingOrCommand) {
|
||||
};
|
||||
|
||||
var mouseUpHandler = function (e) {
|
||||
cls.remove(element, 'ps-x');
|
||||
cls.remove(element, 'ps-in-scrolling');
|
||||
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
||||
};
|
||||
@ -226,6 +227,7 @@ module.exports = function (element, settingOrCommand) {
|
||||
currentPageX = e.pageX;
|
||||
currentLeft = h.toInt(d.css(scrollbarX, 'left'));
|
||||
cls.add(element, 'ps-in-scrolling');
|
||||
cls.add(element, 'ps-x');
|
||||
|
||||
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
||||
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
||||
@ -250,6 +252,7 @@ module.exports = function (element, settingOrCommand) {
|
||||
};
|
||||
|
||||
var mouseUpHandler = function (e) {
|
||||
cls.remove(element, 'ps-y');
|
||||
cls.remove(element, 'ps-in-scrolling');
|
||||
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
||||
};
|
||||
@ -258,6 +261,7 @@ module.exports = function (element, settingOrCommand) {
|
||||
currentPageY = e.pageY;
|
||||
currentTop = h.toInt(d.css(scrollbarY, 'top'));
|
||||
cls.add(element, 'ps-in-scrolling');
|
||||
cls.add(element, 'ps-y');
|
||||
|
||||
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
||||
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user