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 {
|
@mixin in-scrolling {
|
||||||
&.ps-in-scrolling {
|
&.ps-in-scrolling {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
>.ps-scrollbar-x-rail {
|
&.ps-x>.ps-scrollbar-x-rail{
|
||||||
@include scrollbar-rail-hover;
|
@include scrollbar-rail-hover;
|
||||||
>.ps-scrollbar-x {
|
>.ps-scrollbar-x {
|
||||||
@include scrollbar-hover;
|
@include scrollbar-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>.ps-scrollbar-y-rail {
|
&.ps-y>.ps-scrollbar-y-rail {
|
||||||
@include scrollbar-rail-hover;
|
@include scrollbar-rail-hover;
|
||||||
>.ps-scrollbar-y {
|
>.ps-scrollbar-y {
|
||||||
@include scrollbar-hover;
|
@include scrollbar-hover;
|
||||||
|
@ -218,6 +218,7 @@ module.exports = function (element, settingOrCommand) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var mouseUpHandler = function (e) {
|
var mouseUpHandler = function (e) {
|
||||||
|
cls.remove(element, 'ps-x');
|
||||||
cls.remove(element, 'ps-in-scrolling');
|
cls.remove(element, 'ps-in-scrolling');
|
||||||
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
||||||
};
|
};
|
||||||
@ -226,6 +227,7 @@ module.exports = function (element, settingOrCommand) {
|
|||||||
currentPageX = e.pageX;
|
currentPageX = e.pageX;
|
||||||
currentLeft = h.toInt(d.css(scrollbarX, 'left'));
|
currentLeft = h.toInt(d.css(scrollbarX, 'left'));
|
||||||
cls.add(element, 'ps-in-scrolling');
|
cls.add(element, 'ps-in-scrolling');
|
||||||
|
cls.add(element, 'ps-x');
|
||||||
|
|
||||||
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
||||||
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
||||||
@ -250,6 +252,7 @@ module.exports = function (element, settingOrCommand) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var mouseUpHandler = function (e) {
|
var mouseUpHandler = function (e) {
|
||||||
|
cls.remove(element, 'ps-y');
|
||||||
cls.remove(element, 'ps-in-scrolling');
|
cls.remove(element, 'ps-in-scrolling');
|
||||||
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
$(ownerDocument).unbind(eventClass('mousemove'), mouseMoveHandler);
|
||||||
};
|
};
|
||||||
@ -258,6 +261,7 @@ module.exports = function (element, settingOrCommand) {
|
|||||||
currentPageY = e.pageY;
|
currentPageY = e.pageY;
|
||||||
currentTop = h.toInt(d.css(scrollbarY, 'top'));
|
currentTop = h.toInt(d.css(scrollbarY, 'top'));
|
||||||
cls.add(element, 'ps-in-scrolling');
|
cls.add(element, 'ps-in-scrolling');
|
||||||
|
cls.add(element, 'ps-y');
|
||||||
|
|
||||||
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
$(ownerDocument).bind(eventClass('mousemove'), mouseMoveHandler);
|
||||||
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
evt.once(ownerDocument, 'mouseup', mouseUpHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user