Skip to content

[Bug]: Typing curly braces causes text to get deleted when typing in a certain sequence. #42

Description

@davidalayachew

What happened?

Go to the playground, clear the textfield, then type the following sequence of characters in the exact order that they appear.

enum idc
{}

As soon as I press {, the idc gets deleted, and when finished typing, I am left with enum }.

OS

Windows

What browsers are you seeing the problem on?

Firefox

Contact Details (optional)

No response

Additional information

Leave blank

Activity

  1. delabassee commented on Mar 12, 2026

    @delabassee
    Member

    @davidalayachew We just rolled up a lot of fixes in the UI. Can you please try again and confirm that it's now OK?

  2. davidalayachew commented on Mar 13, 2026

    @davidalayachew
    Author

    @davidalayachew We just rolled up a lot of fixes in the UI. Can you please try again and confirm that it's now OK?

    Now it's broken in a different way.

    If I type in the same sequence as above, then press backspace, I lose the left curly brace instead of the right one. @delabassee

  3. delabassee commented on Mar 13, 2026

    @delabassee
    Member

    Hi @davidalayachew When you create an (opening) enclosing delimiter (ex. '{' ), the editor will add the corresponding (closing) delimiter and position the cursor at the beginning of the new created scope.
    Backspace once should delete both, the opening delimiter that you typed, and the closing one added by the editor.
    Are you observing a different behaviour?

  4. davidalayachew commented on Mar 13, 2026

    @davidalayachew
    Author

    @delabassee

    Here is the before and after of me pressing backspace.

    BEFORE

    Screenshot_20260313_035349_Firefox Focus.png

    AFTER

    Screenshot_20260313_035502_Firefox Focus.png

  5. davidalayachew commented on Mar 13, 2026

    @davidalayachew
    Author

    And the screenshot doesn't show it, but my cursor is to the right of both braces.

  6. davidalayachew commented on Mar 13, 2026

    @davidalayachew
    Author

    I should clarify, this does work on desktop Firefox, but fails on Firefox on my phone. I forgot that I specified OS in my original bug report. @delabassee

  7. davidalayachew commented on Mar 13, 2026

    @davidalayachew
    Author

    Works fine on Edge for Android. I don't have chrome, so can't check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions