Skip to content

wrong cursor position in some cases #60

@tamo

Description

@tamo

Testing with etherpad-lite-win 1.8.18, I'm not sure that ep_cursortrace works correctly.

First, the cursor is one char left.
origin[ABC|DEF]->remote[AB|CDEF]
If my cursor is between C and D, other users will see me between B and C.
I think here may be an off-by-one: https://github.com/ether/ep_cursortrace/blob/v3.1.16/static/js/main.js#L92

Second, line-height of folded lines are incorrect.

origin                      remote
1 ABCDEFGHIJKLMNOPQRST|U    1 ABCDEFG
                              HIJKLM|N
                              OPQRSTU

If I use wide screen and my cursor is between T and U, other users with narrow screen will see me at a little higher position, for example, between M and N.
I think the worker lacks line-height while innerdocbody has "line-height: 1.6" (i.e. 160% of font-size in px).

Last, cursor is too low when the screen is narrow (mobile-layout).
outerdocbody usually has "padding-top: 20px" but it will be "0" on mobile-layout.
I think we should take it into account too: https://github.com/ether/ep_cursortrace/blob/v3.1.16/static/js/main.js#L120

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions