Skip to content

Commit

Permalink
Repair cursor (closes DevExpress#1156) (DevExpress#1160)
Browse files Browse the repository at this point in the history
* Revert overflow:hidden for ShadowUI root (closes DevExpress#1156)

* Fix cursor
  • Loading branch information
AndreyBelym authored and kirovboris committed Dec 18, 2019
1 parent 536ea10 commit d7a6566
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "testcafe",
"description": "Automated browser testing for the modern web development stack.",
"license": "MIT",
"version": "0.12.0",
"version": "0.12.1",
"author": {
"name": "Developer Express Inc.",
"url": "https://www.devexpress.com/"
Expand Down
7 changes: 2 additions & 5 deletions src/client/ui/cursor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var messageSandbox = hammerhead.eventSandbox.message;

var styleUtils = testCafeCore.styleUtils;
var positionUtils = testCafeCore.positionUtils;
var eventUtils = testCafeCore.eventUtils;

const CURSOR_CLASS = 'cursor';
const TOUCH_CLASS = 'touch';
Expand Down Expand Up @@ -71,8 +70,6 @@ var CursorUI = {
}

shadowUI.getRoot().appendChild(this.cursorElement);

eventUtils.bind(window, 'scroll', () => this.move(this.x, this.y));
},

isVisible () {
Expand Down Expand Up @@ -101,8 +98,8 @@ var CursorUI = {
this._createElement();

styleUtils.set(this.cursorElement, {
left: this.x + styleUtils.getScrollLeft(document) - this.pointerOffsetX + 'px',
top: this.y + styleUtils.getScrollTop(document) - this.pointerOffsetY + 'px'
left: this.x - this.pointerOffsetX + 'px',
top: this.y - this.pointerOffsetY + 'px'
});

return Promise.resolve();
Expand Down
4 changes: 2 additions & 2 deletions src/client/ui/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
left: 0px;
top: 0px;
margin: 0 !important;
overflow: hidden;
overflow: visible;

.layout-default();

Expand Down Expand Up @@ -188,7 +188,7 @@
.cursor {
.sprite-icon;

position: absolute;
.position-fixed();
left: 0;
top: 0;
width: 35px;
Expand Down

0 comments on commit d7a6566

Please sign in to comment.