allow clicking through invisible mac scrollbars
This commit is contained in:
parent
79c0f83e2c
commit
3eef5f0a63
3 changed files with 11 additions and 9 deletions
|
|
@ -71,17 +71,19 @@
|
|||
|
||||
.ace_scrollbar {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 6;
|
||||
}
|
||||
|
||||
.ace_scrollbar-inner {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
cursor: text;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.ace_scrollbar-h {
|
||||
|
|
@ -91,15 +93,9 @@
|
|||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 6;
|
||||
}
|
||||
|
||||
.ace_scrollbar-inner {
|
||||
position: absolute;
|
||||
height: 1px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
|
||||
.ace_print-margin {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ var MouseHandler = function(editor) {
|
|||
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
|
||||
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
|
||||
event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent");
|
||||
event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [300, 300, 250], this, "onMouseEvent");
|
||||
event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [300, 300, 250], this, "onMouseEvent");
|
||||
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
|
||||
|
||||
var gutterEl = editor.renderer.$gutter;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,10 @@ var ScrollBarV = function(parent, renderer) {
|
|||
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||
renderer.$scrollbarWidth =
|
||||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||
renderer.$scrollbarWidth =
|
||||
this.width = dom.scrollbarWidth(parent.ownerDocument);
|
||||
this.fullWidth = this.width;
|
||||
this.inner.style.width =
|
||||
this.element.style.width = (this.width || 15) + 5 + "px";
|
||||
this.setVisible(false);
|
||||
this.element.style.overflowY = "scroll";
|
||||
|
|
@ -89,6 +92,7 @@ var ScrollBarH = function(parent, renderer) {
|
|||
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||
this.height = renderer.$scrollbarWidth;
|
||||
this.fullHeight = this.height;
|
||||
this.inner.style.height =
|
||||
this.element.style.height = (this.height || 15) + 5 + "px";
|
||||
this.setVisible(false);
|
||||
this.element.style.overflowX = "scroll";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue