cubing.js icon indicating copy to clipboard operation
cubing.js copied to clipboard

TwistyAlgViewer moves cursor around undermining user

Open rokicki opened this issue 2 years ago • 1 comments

To Reproduce Steps to reproduce the behavior:

  1. Go to https://alpha.twizzle.net/explore
  2. Type or paste this algorithm: M2 U' M' U2 M U' M2'
  3. Move the cursor in the alg textarea to the end of the line.
  4. Hit carriage return (cursor now at end of next line).
  5. Hit up arrow (cursor now at beginning of first line).
  6. Type two forward slashes to comment out the alg.
  7. The cursor now is forced to the end of the first line.

Expected behavior TwistyAlgViewer should never move the cursor in response to a typed normal character.

I suspect this is happening as part of some sort of normalization of the alg, as the "extra" carriage return at the end of the alg also disappears as part of this. I want that extra carriage return to stay there.

Browser: Chrome on MacOS.

rokicki avatar Apr 11 '22 16:04 rokicki

I presume you mean TwistyAlgEditor?

In general I need to still make a whole bunch of fixes, which are all really annoying due to async code interacting with sync code. I'll make sure this particular repro gets fixed.

lgarron avatar Apr 11 '22 19:04 lgarron