Skip to content

How to disable autofocus when editor renders? #201

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

Closed
andgordio opened this issue Apr 21, 2018 · 10 comments
Closed

How to disable autofocus when editor renders? #201

andgordio opened this issue Apr 21, 2018 · 10 comments

Comments

@andgordio
Copy link

I have multiple quill editors on a page, and the page always scrolls down to the last non-empty one on load. I found a similar issue being currently discussed on our neighbor's quill component GitHub. Could their solution be quick fix for vue-quill too?

@andgordio
Copy link
Author

andgordio commented Apr 21, 2018

Discovered a pull request #197 aimed at this issue. Looking forward to its merge!

@AkhonzadaIrshad
Copy link

I explore this issue on many forums but nothing worked for me, but I fixed this in some other way with a JS "window" instance, use this "window.scroll(0,0);" method till a genuine fix.

@vZanchiV
Copy link

I do the same, but you see the window scroll with IE for example. It's crazy somebody had a soluce for fix this fucking bug

@Jaspur
Copy link

Jaspur commented Sep 2, 2018

@surmon-china please merge this

@binaryshrey
Copy link

@AkhonzadaIrshad Can you explain in detail how to use your fix.
It's been troubling me a lot

@jfaq89
Copy link

jfaq89 commented Sep 13, 2019

Same problem here. Any updates?

1 similar comment
@felipebelluco
Copy link

Same problem here. Any updates?

@quroom
Copy link

quroom commented Jan 22, 2021

Set initial data

quill_disabled = false

This will prevent autofocus, and when dom is updated, change the quill_disabled as true.
No more autofocus in eidtor render.

<template>
...
        <quill-editor
            ref="myQuillEditor"
            v-model="special_agreement"
            :options="editorOption"
            :disabled="quill_disabled"
          />
...
</template>
created(){
...
   this.$nextTick(()=>{
      this.quill_disabled=false;
    })
}

@baxa29102001
Copy link

Thanks bro very much

@quroom
Copy link

quroom commented Nov 25, 2021

Thanks bro very much

You're welcome!

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

9 participants