Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair cursor (closes #1156) #1160

Merged
merged 2 commits into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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