Fix Scribe mobile issues
- Fix Scribe replace on mobile when opened from menu bar (to be complete this fix needs this PR https://github.com/Enough-Software/enough_html_editor/pull/37) - Ensure all mobile editor call are awaited - Do not clear text if a selection has been restored (which mean we replace a selection) - Avoid collapseToEnd crash
This commit is contained in:
+4
-1
@@ -21,7 +21,10 @@ class RichTextMobileTabletController extends GetxController {
|
||||
|
||||
Future<void> focus() async {
|
||||
try {
|
||||
await htmlEditorApi?.webViewController.evaluateJavascript(source: "document.getElementById('editor').focus();");
|
||||
await htmlEditorApi?.webViewController.evaluateJavascript(source: '''
|
||||
(() => {
|
||||
document.getElementById('editor').focus();
|
||||
})();''');
|
||||
} catch (e) {
|
||||
logWarning('RichTextMobileTabletController::focus:Exception: $e');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user