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] The selection is visible over editor UI #5753

Closed
Mgsy opened this issue Nov 19, 2019 · 8 comments · Fixed by #14580
Closed

[iOS] The selection is visible over editor UI #5753

Mgsy opened this issue Nov 19, 2019 · 8 comments · Fixed by #14580
Assignees
Labels
browser:ios squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Mgsy
Copy link
Member

Mgsy commented Nov 19, 2019

📝 Provide detailed reproduction steps (if any)

Edit: 15.09.2022

  1. Go to https://ckeditor.com/docs/ckeditor5/latest/examples/builds/document-editor.html.
  2. Create a non-collapsed selection at the beginning of the editable.
  3. Open the headings dropdown.
  4. Try to click on a dropdown item.

✔️ Expected result

It's possible to pick an option from the dropdown.

❌ Actual result

The native selection appears and it's impossible to pick an option from the dropdown.

📃 Other details

test

  • Browser: Safari
  • OS: iOS
  • CKEditor version: Latest master

More examples:


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

@Mgsy Mgsy added type:bug This issue reports a buggy (incorrect) behavior. status:confirmed browser:ios labels Nov 19, 2019
@Mgsy Mgsy added this to the unknown milestone Nov 19, 2019
@Mgsy Mgsy added the support:2 An issue reported by a commercially licensed client. label Nov 19, 2019
@pomek pomek removed this from the unknown milestone Feb 21, 2022
@oleq oleq changed the title [iOS] The caret is visible over opened dropdown [iOS] The caret is visible over editor UI Sep 8, 2022
@oleq
Copy link
Member

oleq commented Sep 8, 2022

This is a known bug in iOS. The only way to address this is by blurring the text field the selection is rendered in.

@ckeditor/qa-team  Can you confirm this happens less often since #11838? The editing root gets blurred now and the focus moves to the dropdown making the selection disappear.

@Mgsy
Copy link
Member Author

Mgsy commented Sep 13, 2022

@ckeditor/qa-team  Can you confirm this happens less often since #11838? The editing root gets blurred now and the focus moves to the dropdown making the selection disappear.

I can't reproduce this issue anymore, after opening the dropdown, the selection moves to it and is invisible in the editable.

@Mgsy Mgsy closed this as completed Sep 13, 2022
@Reinmar Reinmar added the resolution:resolved This issue was already resolved (e.g. by another ticket). label Sep 14, 2022
@Reinmar
Copy link
Member

Reinmar commented Sep 14, 2022

This is awesome news :) I haven't thought about this side-effect of our recent changes.

@Mgsy
Copy link
Member Author

Mgsy commented Sep 15, 2022

Unfortunately, the issue still exists 😢 For the non-collapsed selection, after moving the focus to the dropdown, the native selection is invisible, but it appears again after clicking on a dropdown item.

I've edited the first post and added the image showing the problem.

@Mgsy Mgsy reopened this Sep 15, 2022
@Mgsy Mgsy changed the title [iOS] The caret is visible over editor UI [iOS] The selection is visible over editor UI Sep 15, 2022
@Mgsy Mgsy removed the resolution:resolved This issue was already resolved (e.g. by another ticket). label Sep 15, 2022
@Witoso Witoso added the squad:core Issue to be handled by the Core team. label May 22, 2023
@Witoso
Copy link
Member

Witoso commented May 22, 2023

The current behavior is a bit different (iOS 16.5). The selection after opening the dropdown is not visible, but you still cannot select options. Sometimes it works when I bash multiple times on the screen or probably when the option is above the select (paragraph's case).
Recording:

RPReplay_Final1684741099.MP4

@Witoso
Copy link
Member

Witoso commented May 22, 2023

Ideas:

  • on the renderer level, remove DOM selection while editable is blurred.
  • maybe there are some APIs that we could use?
  • higher z-index on iOS on dropdown?

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label May 22, 2023
@oleq
Copy link
Member

oleq commented May 23, 2023

  • on the renderer level, remove DOM selection while editable is blurred.

We actually do a similar thing in the link feature. The selection that you see on a link when you edit it is a fake marker. You can tell because the selection slightly changes its color and size depending on the OS when you open the link UI. We did that to maintain the UX. Otherwise, the selection in the editing root would disappear (DOM focus goes to the link UI) and, after a short while, it would be hard to tell what is getting linked and where.

This is not a system-wide solution, though (ATM only limited to links). But if we managed to have it available for all features, then we could control the z-index of the fake selection marker and probably work around the original issue. This would probably be handled on the global editor FocusTracker level: if the focus remains in the editor but not in the editing root, then render a fake selection.

image
  • maybe there are some APIs that we could use?
  • higher z-index on iOS on dropdown?

Sadly, this whole thing has nothing to do with z-index. Rendering the selection over everything is happening on the OS-level and there's nothing we can do about it in CSS.

@Witoso
Copy link
Member

Witoso commented May 24, 2023

Scope:

  • Extending the mechanism of fake selection (make it more generic and part of the core). The same for all browsers.
  • Only iOS onBlur or always switch to fake selection when we move to some inputs?

@niegowski niegowski self-assigned this May 26, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels May 26, 2023
arkflpc added a commit that referenced this issue Jul 14, 2023
…n-blur

Fix (engine): The DOM selection should not obscure the clickability of dropdown items on iOS. Closes #5753.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 14, 2023
@CKEditorBot CKEditorBot added this to the iteration 65 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:ios squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
8 participants