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

Toolbar is active when the editor is disabled #909

Closed
benbro opened this issue Sep 2, 2016 · 4 comments
Closed

Toolbar is active when the editor is disabled #909

benbro opened this issue Sep 2, 2016 · 4 comments

Comments

@benbro
Copy link
Contributor

benbro commented Sep 2, 2016

When the editor is disabled, the toolbar should be disabled too.
Maybe the editor should tell all the modules that its status is changed.

Some modules might still want to stay enabled even when the editor is disabled.
For example a multi-cursor module might still want to show the cursors of other users.

I also can't find a way to enable/disable a single module.

Steps for Reproduction

  1. Visit http://quilljs.com/
  2. Write quill.disable(); in the console to disable the editor.
  3. Click on the list button in the toolbar

Expected behavior:
Nothing should happen because the editor is disabled.

Actual behavior:
The title 'Quill Rich Text Editor' is turned into a list.

Platforms:
Firefox 48 on Windows 7

Version:
1.0.0-rc4

jacobmllr95 pushed a commit to jacobmllr95/quill that referenced this issue Sep 14, 2016
This commit improves the enable/disable handling of the quill instance.
It introduces a new event called `STATE_CHANGE` which gets emitted when
the global `enable()` function is called.

Closes slab#909.
@jhchen jhchen closed this as completed in 4861065 Oct 2, 2016
tim-mc pushed a commit to tim-mc/quill that referenced this issue Dec 12, 2016
tim-mc pushed a commit to tim-mc/quill that referenced this issue Dec 12, 2016
@ben2323
Copy link

ben2323 commented Jul 2, 2017

Was this bug fixed already ?

@shuckster
Copy link

shuckster commented Jul 18, 2017

I'm still seeing it.

I'm adding my toolbar to its own container, if that helps.

EDIT: Ah yes, this is still an issue with "strict" set to false:
https://codepen.io/anon/pen/QgRYgg

Also, the toolbar-container didn't matter after all:
https://codepen.io/anon/pen/BZeMJQ

@jhchen
Copy link
Member

jhchen commented Jul 18, 2017

Actually I think the strict is operating backwards. If you remove the config it works as expected (toolbar buttons having no effect).

@iKrishnaSahu
Copy link

@jhchen
This behaviour is still reproducible with latest stable version of quill.
I was facing this issue in angular library - KillerCodeMonkey/ngx-quill#893

Stackblitz - https://stackblitz.com/edit/js-cspmsm?file=index.html

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

No branches or pull requests

5 participants