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

iOS: When you add a space after the link, formatting as link is still being added #17171

Open
kubaklatt opened this issue Sep 27, 2024 · 7 comments · May be fixed by #17481
Open

iOS: When you add a space after the link, formatting as link is still being added #17171

kubaklatt opened this issue Sep 27, 2024 · 7 comments · May be fixed by #17481
Labels
domain:mobile This issues reports a problem related to a mobile environment. package:link status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@kubaklatt
Copy link

kubaklatt commented Sep 27, 2024

📝 Provide detailed reproduction steps (if any)

  1. Visit for example https://ckeditor.com/ckeditor-5/demo/mobile-support/
  2. Select text and add a link to it
  3. Move the selection right after the link, add a space, and try to continue writing the text

✔️ Expected result

The link is no longer added to the text that comes after a space

❌ Actual result

Formatting as the link is still added after the space

ios-issue.mov

📃 Other details

  • Browser: Safari
  • OS: iOS

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@kubaklatt kubaklatt added type:bug This issue reports a buggy (incorrect) behavior. package:link domain:mobile This issues reports a problem related to a mobile environment. labels Sep 27, 2024
@aldonace-wu aldonace-wu added the support:2 An issue reported by a commercially licensed client. label Nov 7, 2024
@niegowski
Copy link
Contributor

I suspect it happens because the 2-step caret movement handles the mousedown event to clear link attributes from the selection and it probably does not fire on mobile.

private _enableClickingAfterNode(): void {

@Mati365
Copy link
Member

Mati365 commented Nov 18, 2024

@niegowski I checked it, it's fired, but it's fired after selection change event, which makes this function behave incorrectly. Fixed it in PR.

@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Nov 18, 2024
@Witoso
Copy link
Member

Witoso commented Nov 22, 2024

I cannot reproduce this, @kubaklatt could you share the iOS/Safari version.

@kubaklatt
Copy link
Author

@Witoso I checked again and the issue is still reproducing.

iOS and Safari version - 18.0.1

@Mati365
Copy link
Member

Mati365 commented Nov 22, 2024

@kubaklatt Can you test if this still happens in this PR?

@Witoso
Copy link
Member

Witoso commented Nov 22, 2024

Ok, "remove the selection" step needs to always move after the link, it cannot be moved to other piece of text and back to the link.

@kubaklatt
Copy link
Author

@Mati365 I checked this PR and from what I see it fixes this bug 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:mobile This issues reports a problem related to a mobile environment. package:link status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants