wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
63 stars 44 forks source link

Text cursor sits between lines of code following a language tag #514

Closed azmec closed 4 months ago

azmec commented 4 months ago

What happened?

The text cursor should be aligned with the line of code the user is currently typing in. However, when the text cursor is on a line following an explanation with a language tag, the cursor sits in-between lines.

  1. Copy and paste the below code into a Wordplay project.
    
    ``Welcome to your blank project!``/en

Phrase("foo bar")


2. Move the text cursor to the second, empty line of code.
3. Observe that the text cursor sits between the second and third lines of code.
4. Type any character. Observe that the cursor jumps to the second line of code as it normally should.
5. Empty the second line.
6. Remove the language tag on the first line of code.
7. Move the text cursor to the second line of code. Observe that it is aligned with the second line of code.

### Anything else?

The below image shows text cursor sitting between the second and third line, as it should in step 3.

![Screenshot of the text cursor sitting between the second and third line of a  Wordplay performance. The text cursor is at the start of the second and third lines.](https://github.com/wordplaydev/wordplay/assets/65310073/cede05c6-4bfb-41eb-acbf-cd3e3b3823bc)

### What browsers are you seeing the problem on?

Firefox, Chrome

### What operating system are you using?

Linux
amyjko commented 4 months ago

Reproduced on Chrome, Safari, Edge, and Arc. Thanks for reporting!

amyjko commented 4 months ago

Diagnosed:

Fix: