Quill: Bubble theme toolbar shows up underneath element

Created on 5 Nov 2016  路  12Comments  路  Source: quilljs/quill

The bubble toolbar shows up underneath a the side menu. How can I change it so the toolbar loads into the body container instead of inside the quill document container? Otherwise the toolbar gets cut off like so:

screen shot 2016-11-05 at 5 50 32 am

Expected behavior:

The quill toolbar should always be on top of everything. Should load toolbar into body container to make this happen.

Actual behavior:

The toolbar loads underneath elements on the screen since the toolbar is inside the quill container.

Most helpful comment

I frankly believe the tooltip component should be appended to the body instead. This would solve a lot of issues. This is how medium-editor works too.

All 12 comments

Quill can only guarantee to be on top of other Quill UI (which it does), but short of making users place the Quill container at the root, it cannot guarantee other UI in your application will not cover it.

Take a look at Understanding CSS z-index and in particular this example. Even though DIV 4 has the highest z-index, it cannot escape its relative parent's place in the DOM hierarchy.

@jhchen your right, I actually found out that I had a mistake in my design which was causing this. I fixed it now and the toolbar works as expected. Not an issue with Quill.

@sferoze : I am using angular material that has fixed sidebar, how can I fix this issue I am also having the same issue.
Even I tried z-index but as said it won't help.

@ajoshi31 if z-index doesn't work then you will have to look at the layout of your dom elements and try adjusting the order of dom elements in html. Also check the overflow of the quill container and make sure its set to visible.

In my case I did a ton of restructuring of how the menu works and I noticed that the toolbar issue was resolved when I did.

I have solved this problem using the bounds configuration option as mentioned in #1124

I frankly believe the tooltip component should be appended to the body instead. This would solve a lot of issues. This is how medium-editor works too.

Same here. Sometime it's difficult to set the right bounds, and the drop down menu from the bubble toolbar does not observe the bounds option.

@jhchen Should have a look if the tooltip can be appended to the body instead.

Has this been looked into? I've used bounds to fix this for the popup toolbar in Bubble, but the link preview for any linked text doesn't seem to follow these bounds :(.

Indeed, the link tooltip in Bubble seems broken.

I just posted here: https://github.com/quilljs/quill/issues/360

I solve that using z-index on .ql-bubble .ql-tooltip

.ql-bubble .ql-tooltip {
  z-index: 1;
}

I found a solution for my situation:
when create the configuration object, set property _'bounds'_ with the selector of quill container.

Example:

const SELECTOR_CONTAINER = '#quill-container-2';
const DEFAULT_CONFIG = {
        theme: 'bubble',
        bounds: SELECTOR_CONTAINER
};

new Quill(SELECTOR_CONTAINER, DEFAULT_CONFIG);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rsdrsd picture rsdrsd  路  3Comments

Softvision-MariusComan picture Softvision-MariusComan  路  3Comments

markstewie picture markstewie  路  3Comments

visore picture visore  路  3Comments

DaniilVeriga picture DaniilVeriga  路  3Comments