Skip to content

feat(NcRichContenteditable): put caret in the end when focus input#4924

Merged
Antreesy merged 1 commit intomasterfrom
feat/noid/set-caret-to-end
Dec 11, 2023
Merged

feat(NcRichContenteditable): put caret in the end when focus input#4924
Antreesy merged 1 commit intomasterfrom
feat/noid/set-caret-to-end

Conversation

@Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Dec 6, 2023

☑️ Resolves

  • Put caret to the end of inputted text when focus it, instead of start

🖼️ Screenshots

Casted some tests (with mouse clicks, range selections, keyboard tabbing)

Screencast.from.06.12.2023.14.44.57.webm

🚧 Tasks

  • Manual tests:
    • Chrome
    • Firefox
    • Safari
  • TODO
    • Check if code could be reused:

// Put cursor at the end of the selection
const newRange = document.createRange()
newRange.setStart(event.target, range.endOffset)
newRange.collapse(true)
selection.removeAllRanges()
selection.addRange(newRange)

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@Antreesy Antreesy added bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components vue 3 labels Dec 6, 2023
@Antreesy Antreesy added this to the 8.3.1 milestone Dec 6, 2023
@Antreesy Antreesy self-assigned this Dec 6, 2023
@Antreesy Antreesy added 3. to review Waiting for reviews and removed vue 3 labels Dec 6, 2023
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants