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

[QUESTION]Is there any method to persist editor cursor/selection when keyboard is dismissed? #236

Closed
yuanqifd opened this issue Mar 23, 2022 · 1 comment
Labels
question Further information is requested

Comments

@yuanqifd
Copy link

Hi,
May I ask a question about focus of the editor, that is, when keyboard is closed, the editor loses focus.
I have tried to restore the cursor/selection after closing keyboard in this way:

  • save the selection range by invoking
    _evaluateJavascript(source: "$('#summernote-2').summernote('saveRange');");
  • focus the editor and restore the selection range by invoking
    _evaluateJavascript(source: "$('#summernote-2').summernote('focus');");
    _evaluateJavascript(source: "$('#summernote-2').summernote('restoreRange');");

But it does not work.
Is there any method to persist editor cursor/selection when keyboard is dismissed?
Btw, I dismiss keyboard by SystemChannels.textInput.invokeMethod('TextInput.hide')

Thanks.

@yuanqifd yuanqifd added the question Further information is requested label Mar 23, 2022
@tneotia
Copy link
Owner

tneotia commented Mar 23, 2022

Unfortunately no, this is related to #47, webview support on Flutter should handle this internally but it does not.

@tneotia tneotia closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants