Skip to content

Mouse positions in replay are inaccurate #5

@stefandesu

Description

@stefandesu

For me (using Brave), the mouse positions in the replay are offset. Looking at the CSS, it seems like the offset is 15 pixels (no matter how small or big I make the cursor). Maybe you can fix it in CSS, but for me, it works well if I adjust the following piece of code:

DOMRec/domrec.js

Lines 651 to 657 in b296fda

DOMReplay.prototype.setCursorPos = function(x, y) {
this.cursor.style.left = x + "px";
this.cursor.style.top = y + "px";
if (!this.cursor.parentNode) {
this.host.appendChild(this.cursor);
}
}

// TODO: Dynamically determine offset (or fix in CSS).
const offset = 15
this.cursor.style.left = (x + offset) + "px";
this.cursor.style.top = (y + offset) + "px";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions