Skip to content

cmd + delete goes too far on chromium browsers #36

Closed

Description

@feedthejim

repro:

  • type foobar
  • hit enter
  • type baz
  • cmd+delete to delete line while cursor is at the end of baz

results:

foo

expected:

foobar

Browser tested:
chromium/edge: repro the errors
safari: deleteHardLineBackward not supported error
firefox: does it correctly

Screen.Recording.2021-01-29.at.11.41.20.mov

Activity

  1. trueadm commented on Jan 29, 2021

    @trueadm
    Collaborator

    This is a strange one, as it seems that getTargetRanges is reporting back what you're seeing:

    collapsed: false
    endContainer: text (current paragraph)
    endOffset: 3
    startContainer: text (previous paragraph)
    startOffset: 3

    Not sure why the native behavior is doing this...

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions