Giter VIP home page Giter VIP logo

Comments (6)

kizu avatar kizu commented on August 24, 2024

It seems that the semicolon isn't the crucial to reproduce.

It reproduced to me when you press enter after some symbols at the end of block with contenteditable and there were no whitespaces at the start of the line.

So, in empty pane writing something (without spaces/tabs at start) in the first line and pressing enter would reproduce the bug.

Also, there is a bug that relates to this: when you're on the last line and didn't press the enter for the first time, them deleting everything in this line would place the caret at the beginning of code block.

So, after writing a+enter+enter+b you could see the following (“|” is a caret):

a
b|

Then pressing backspace the b would be deleted, but the caret would be moved to the start:

|a

But if you'd press the enter after b (which won't create a new line), then pressing backspace wouldn't move the caret.

from dabblet.

kizu avatar kizu commented on August 24, 2024

Also, I saw that this behavior can be seen both in Chrome/Safari and in Firefox, but in Firefox this works another way: when you press enter for the first time, you don't see the newline, but when you press any other key (chars, or enter again), you'd see that there were a new line, so pressing enter two times would create two line breaks (and only one in webkits).

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

It seems this only happens when the caret is at the end of the text. Can anyone reproduce in other cases?

from dabblet.

kizu avatar kizu commented on August 24, 2024

Only at the end of text to me too. In other cases it was ok every time I've tested.

from dabblet.

LeaVerou avatar LeaVerou commented on August 24, 2024

I think I fixed it, although in a way I'm not too proud of. Can you confirm please?

from dabblet.

kizu avatar kizu commented on August 24, 2024

Works for me now.

from dabblet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.