Skip to content

Commit

Permalink
Merge branch 'liemvu-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
the-airbender committed Nov 8, 2023
2 parents 41133bf + 65f6b66 commit 68f918c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/src/quill_editor_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ class QuillHtmlEditorState extends State<QuillHtmlEditor> {
}
editor.applyGoogleKeyboardWorkaround = true
editor.on('editor-change', function(eventName, ...args) {
try {
// args[0] will be delta
var ops = args[0]['ops']
if(ops === null) {
Expand All @@ -870,7 +870,7 @@ class QuillHtmlEditorState extends State<QuillHtmlEditor> {
if( ops[0]["retain"] === undefined || !ops[1] || !ops[1]["insert"] || !ops[1]["insert"] || ops[1]["list"] === "bullet" || ops[1]["list"] === "ordered" || ops[1]["insert"] != "\\n" || oldSelectionLength > 0) {
return
}
setTimeout(function() {
var newPos = editor.getSelection(true).index
if(newPos === oldPos) {
Expand All @@ -879,7 +879,9 @@ class QuillHtmlEditorState extends State<QuillHtmlEditor> {
}
}, 30);
//onRangeChanged();
} catch(e) {
console.log('applyGoogleKeyboardWorkaround - editor-change', e);
}
});
} catch(e) {
console.log('applyGoogleKeyboardWorkaround', e);
Expand Down

0 comments on commit 68f918c

Please sign in to comment.