Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 11, 2023

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 Related to the vue 3 migration 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 Related to the vue 3 migration labels Dec 6, 2023
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy merged commit 759d127 into master Dec 11, 2023
15 checks passed
@Antreesy Antreesy deleted the feat/noid/set-caret-to-end branch December 11, 2023 22:50
@ShGKme ShGKme mentioned this pull request Dec 22, 2023
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.

None yet

3 participants