-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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] [Webview] Caret goes offscreen while typing #1321
Comments
I think this was a native issue of this platform. Didn't we have it reported already, @Mgsy? |
I believe we didn't report it, but this one looks like the iOS issue. It could be reproduced in our editor, i.e. on ckeditor5.github.io or in a simple Works fine on Android. |
OK, so this is an upstream issue. I just tried this in native contentEditable too and it was completely broken. I tested a couple other editors and it wasn't working too. It's strange, though. I don't think this bug existed. It may be new. We should report it to Apple. @Mgsy could you create samples with bare textarea and bare contentEditable element and record screencasts of what's happening? |
This could be because our |
I've prepared a sample with those elements. And here is a screencast, so you can check the behaviour in Recorded on iPad@iOS 12.0. |
On the desktop, this would help: editor.editing.view.on( 'render', () => {
editor.editing.view.scrollToTheSelection();
}, { priority: 'low' } ); I'm testing it in Chrome with a code like this and every time "foo" is inserted into the editor, the viewport is properly scrolled to show the caret: setInterval( () => {
editor.model.change( writer => {
editor.model.insertContent( writer.createText( 'foo' ) );
} );
}, 2000 ); (DEMO: https://jsfiddle.net/tsf7mxd4/1/) It has to be tested with an action which would not natively scroll the content, so not with the native typing because on all browsers (except Safari@iOS) typing does scroll the viewport. So, the above demo works fine in Chrome and Safari@macOS and Chrome@Android. But on iOS it does not work. Why? Because the viewport mechanics is broken there when the software keyboard is visible. That's an old issue (ckeditor/ckeditor5-design#149) that we tried to interest people about, but with no luck so far. However, just recently I talked with @whsieh on W3C TPAC that perhaps this could be fixed. I'm actually working on filing bug reports for that right now. Anyway, to sum up, right now we can see that there are two issues:
|
@Reinmar Thanks for the detailed reply. I'm a bit hesitant it will be fixed in the short term since the first time this bug was reported was in 2016 according to the openradar link |
Apple rarely shares their plans regarding such issues. The best solution, IMO, for now, would be to get as many developers as possible leaving feedback under https://bugs.webkit.org/show_bug.cgi?id=191185 regarding the severity of this issue. Since it's considered a regression, I think there's not much doubt that it's doesn't work as intended now, so the only problem should be properly prioritising it. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it). |
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
11.1.1, any of the presets.
📋 Steps to reproduce
So we offer email functionalities within our React-Native app and while this works perfectly on Android, we are having issues with automatic scrolling on iOS when typing. (Note that a enter linebreak does work properly but continous typing goes off screen.)
I realise this might not be directly a bug of CKEditor, but I am desperate to figure out a solution as there are currently no proper rich text editors for react-native.
📃 Other details that might be useful
React-Native implementation details to reproduce.
RN version: 0.56
Render method:
(Note this is not RN's Webview due to us needing WKWebview and React-native only supporting it since RN 0.57. https://github.com/CRAlpha/react-native-wkwebview)
The actual html we load:
The text was updated successfully, but these errors were encountered: