Skip to content

Fixing AceEditor cursor position not to move top left when others are editting#1049

Open
yoshiokatsuneo wants to merge 1 commit intojsfiddle:developfrom
yoshiokatsuneo:fix_ace_editor_cursor
Open

Fixing AceEditor cursor position not to move top left when others are editting#1049
yoshiokatsuneo wants to merge 1 commit intojsfiddle:developfrom
yoshiokatsuneo:fix_ace_editor_cursor

Conversation

@yoshiokatsuneo
Copy link
Copy Markdown

On AceEditor, when one made any change on the editor, other people's cursor
position always move to top left position. This fix the issue by keeping
cursor position when other people is editting.

… editting.

On AceEditor, when one made any change on the editor, other people's cursor
position always move to top left position. This fix the issue by keeping
cursor position when other people is editting.
@benjii
Copy link
Copy Markdown

benjii commented Feb 22, 2015

+1. I have this exact problem and I would love to see this change merged. Thank you for submitting a fix for this!

@benjii
Copy link
Copy Markdown

benjii commented Feb 25, 2015

Hi @ianb - apologies to link you into this thread out of the blue, but would you mind taking a look at this pull request?

Thanks in advance! And thanks for togetherjs - totally awesome. :)

@simonwex
Copy link
Copy Markdown
Contributor

Hey @benjii, do you have a test or at least a sample integration that this can be tested with?

@benjii
Copy link
Copy Markdown

benjii commented Mar 20, 2015

Hi @simonwex - thank you for your reply.

I regret to say that I don't have a test that can replicate this bug against the mainline codebase. However, I can demonstrate this bug via the web app that I am building.

[As an aside, it is a web app for conceptualising software - it uses PogoScript as the declarative language].

The replication steps are as follows;

  1. Navigate to the Blueprint Scratchpad;
  2. Go to the "Create" button and create a new "Conceptual Model";
  3. You'll see some text and a dinky little sample diagram appear.
conceptual model for "Warehouse System"
 concept "Warehouse"
  has many "Products"
  has many "Orders"
  has one "Foreman"

 concept "Products"
  has many "Orders"

Play with this if you like - as you specify additional concepts (and 'has one' and 'has many' relationships) the diagram will update, thus demonstrating your conceptual model graphically.

The (Alleged) Bug
If you enter a real-time collaboration session with someone else you will notice that any edit within the Ace Editor by any other collaborator will reset the cursor for all other collaborators to (0,0).

This does not prevent any other user from re-positioning the cursor and applying subsequent edits - it's just a minor inconvenience really.

I hope that answers your query? If not please do get in touch again.

Thanks and regards,
Ben

PS: This is running on a single Heroku dyno at the moment, so it'll take a while to spin up (and might be a bit sluggish!).

PPS: Thanks again for TogetherJS - awesome tool!

@simonwex
Copy link
Copy Markdown
Contributor

Hey @benjii I'm certainly seeing that bug. I'll try to merge it this weekend.

@yoshiokatsuneo
Copy link
Copy Markdown
Author

@simonwex So, is this merged ?

@woniesong92
Copy link
Copy Markdown
Contributor

@yoshiokatsuneo sorry for the delay. Let me take a look this week and merge it

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

Successfully merging this pull request may close these issues.

4 participants