-
Notifications
You must be signed in to change notification settings - Fork 930
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
Fix issue with unnecessary editor focus on mount #321
Conversation
Does this require a semver bump for the Quill dependency? |
It looks like the behavior that causes Switching to |
@alexkrolick When can you fix this bug, please push a new version |
Does #312/ |
I just updated to 1.2.4, But seems the problem is still there |
I updated to 1.2.4 , but this problem is still there @alexkrolick, I think #321 fix this problem as well |
|
@alexkrolick it looks like a fix for this was merged but with no version bump (unless I'm missing something)? Still |
If the editor has content upon initial load it will gain focus, which can cause unexpected page scrolling. This is because of using `.pasteHTML()` (which is just a wrapper around `.clipboard.dangerouslyPasteHTML()`) - doing it this way fixes the issue with autofocus. (Incidentally, credit for the fix goes to @jetzhou - see zenoamaro/react-quill#321)
I fixed this by not calling
... with the following.
|
I have the same issue with angular 5. Can someone please explain how to solve the issue with angular 5 ? |
@bamunusingha could you fix this somehow because I'm still getting this error in Angular 6 |
I am also getting error in angular 5. Did you guys fix this issue? |
This is currently my dirty hack in Angular (Typescript). After you call
|
This helped, thanks a lot ! 👍 |
I'm using React and I had problems with react-quill editor focusing when it was not supposed to. Using useMemo and useCallback hooks properly was the key in order to control unnecessary renders. React v.16.13.1 Hope this helps someone! |
@marinona i am using useMemo as you suggested in other comment as well but still facing this issue? |
Hi @theindianappguy !
|
* Rich text editor element * Lint * Add placeholder * Inner HTML, better toolbar options, placeholder as attribute * Lint * Docs * Add example question to demo assessment * Re-add npm files * Change initial content setting to avoid autofocus zenoamaro/react-quill#321 (comment) * Remove boostrap styling from example question * Styling * Set inherited font to toolbar as well * Outline on focus Co-authored-by: Matthew West <matt@prairielearn.com>
dangerouslyPasteHTML
will always grab editor focus, which is not necessarily desired all the time. This simply moves up the logic without the focus part.