Skip to content

Commit

Permalink
Fix cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBelym committed Jan 20, 2017
1 parent a183432 commit a1cfd05
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
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
2 changes: 1 addition & 1 deletion src/client/ui/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
.cursor {
.sprite-icon;

position: absolute;
.position-fixed();
left: 0;
top: 0;
width: 35px;
Expand Down
2 changes: 1 addition & 1 deletion test/functional/fixtures/regression/gh-1138/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe.skip('[Regression](GH-1138)', function () {
describe('[Regression](GH-1138)', function () {
it('Test should click on target that has moved during the action', function () {
return runTests('testcafe-fixtures/index.test.js', 'Click on element bound to the right bottom corner');
});
Expand Down

0 comments on commit a1cfd05

Please sign in to comment.