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

A connected user editing can send another user’s cursor to the top of the document #3

Open
codingisacopingstrategy opened this issue Feb 22, 2015 · 4 comments

Comments

@codingisacopingstrategy
Copy link
Contributor

I will have to do more research if this occurs always and with all browsers—but we’ve been running into this problem a lot.

It is kind of hard to test though, because you need to be with more people!

@enjalot
Copy link
Contributor

enjalot commented Feb 22, 2015

interesting. what if we setup a client-side "monkey typewriter" mode that
would type random characters at a relatively steady rate.

does this happen with the pad example in racer or share? i've worked with
codemirror cursor control a bit, if we are replacing ranges of text we
might want to explicitly update the cursor's position accordingly
I did this with my Inlet project
https://github.com/enjalot/Inlet/blob/master/src/inlet.js#L47
example usage (click on a number or a hexcode to change it rapidly)
http://enjalot.github.io/Inlet/

On Sun, Feb 22, 2015 at 2:26 PM, Eric Schrijver [email protected]
wrote:

I will have to do more research if this occurs always and with all
browsers—but we’ve been running into this problem a lot.

It is kind of hard to test though, because you need to be with more people!


Reply to this email directly or view it on GitHub
#3.

Ian Johnson - 周彦
http://enja.org

@codingisacopingstrategy
Copy link
Contributor Author

I’m all for the monkey!
Though I will have to look at this later given my timezone.

Cheers!E

@codingisacopingstrategy
Copy link
Contributor Author

I fooled a bit around trying to set up a typewriter monkey, but had trouble synthesizing the keyboard events in JavaScript. Do you have an idea of what would the best approach for that?

@enjalot
Copy link
Contributor

enjalot commented Apr 29, 2015

we could skip key events and directly set model data. this would
effectively simulate another browser typing.

btw i changed the logic to use setDiffDeep which doesnt do string diffs.
this means the updates are less granular but it solved some race conditions
i was seeing with codemirror auto formatting.
On Apr 29, 2015 8:33 AM, "Eric Schrijver" [email protected] wrote:

I fooled a bit around trying to set up a typewriter monkey, but had
trouble synthesizing the keyboard events. Do you have an idea of what would
the best approach for that?


Reply to this email directly or view it on GitHub
#3 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants