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

Error on Paste text (Android, Chromium ) #1548

Closed
volser opened this issue Jun 25, 2017 · 2 comments
Closed

Error on Paste text (Android, Chromium ) #1548

volser opened this issue Jun 25, 2017 · 2 comments

Comments

@volser
Copy link

volser commented Jun 25, 2017

on Android Chromium I have next code

quill.on('editor-change', function(eventName, args) {
  //console.log(JSON.stringify(quill.getSelection()));   
  console.log(JSON.stringify(quill.getFormat()));
});

On paste from buffer I'm getting next error
"Uncaught TypeError: Cannot read property 'index' of null", source: file:///android_asset/quill/quill.min.js (7)

Because, on paste quill.getSelection() is null on Android

 getFormat(index = this.getSelection(), length = 0) {
    if (typeof index === 'number') {
      return this.editor.getFormat(index, length);
    } else {
      return this.editor.getFormat(index.index, index.length); **<-- bug here "index" is null**
    }
  }
@pretzelhammer
Copy link

bump

Also experiencing this issue on Chrome 61 on macOS 10.12 Sierra.

@jhchen jhchen closed this as completed in 4c472fa Oct 5, 2017
@ycjcl868
Copy link

ycjcl868 commented Aug 9, 2018

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants