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

Code distorting in text (re: #218) #228

Open
brideylea opened this issue May 8, 2024 · 6 comments
Open

Code distorting in text (re: #218) #228

brideylea opened this issue May 8, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@brideylea
Copy link
Collaborator

Hi Conal,

Submitting this bug on behalf of Gari. This is in reference to a previous Github issue (#218). When working on a transcription, errors are occurring in the code when highlighting text. In some instances clicking 'save' corrects the code, but other times the code is actually changing (not just superficially) and resulting in errors e.g. line 7 in the first image and line 8 in the second image.

Screenshot 2024-02-26 at 6 25 37 pm
Screenshot 2024-02-25 at 9 36 36 pm

See also images 3 and 4 for further instances.

Screenshot 2024-05-01 at 3 28 13 PM
Image 1-5-2024 at 4 58 PM

@brideylea brideylea added the bug Something isn't working label May 8, 2024
@gurridhala
Copy link

Is anyone working on this issue? It is still happening and I first posted the issue over 14 months ago.

@brideylea
Copy link
Collaborator Author

Hi @r-tae

Not sure if this is in your wheelhouse. If it is would you be able to check it out please?

Thank you!
Bridey

@r-tae
Copy link
Collaborator

r-tae commented Feb 21, 2025

Thanks Bridey, I'll look into this; definitely my wheelhouse

This looks like a nasty bug, but the video in #218 should be helpful for diagnosing it

@r-tae
Copy link
Collaborator

r-tae commented Mar 3, 2025

@brideylea @gurridhala I've tried to reproduce this (I'm also on MacOS), I've only been able to do so in Firefox; I can only make it happen maybe once every 10-15 tries and I can only do so by:

  1. making a selection
  2. dragging the selection (this is only possible in firefox) to move it somewhere else in the document
  3. pressing cmd-z to undo and then selecting somewhere else in the document

Do you have another way that reproduces it more reliably? This is a bug in codemirror (or, at least, out use of codemirror) and that's a particularly complex library and at this rate I think it would take a long time for me to even find a cause, let alone fix it

@r-tae
Copy link
Collaborator

r-tae commented Mar 3, 2025

For my own future reference, I can reproduce it in a document with no soft line wraps.

Image

@r-tae
Copy link
Collaborator

r-tae commented Mar 3, 2025

I can reproduce it if I replace the entire document with a different one (valid xml) before testing; so its not related some weird bleedthrough of the initial state into the current working state.

If I put a line break in the middle of every <line></line> then it's reproducible, but is restricted to the end of every second line; meaning it follows the closing </line> tags.

It is reproducible if I rename every <line> tag to <lime> or <a>; not if I remove all <line>s; but if I then add a <a /> to the end of every line its reproducible again

Very bizarre but at least I have some leads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants