Enable disable toolbar width#1415
Conversation
|
|
||
| const menuEl = document.createElement('ul'); | ||
| menuEl.classList.add('dropdown-menu'); | ||
| menuEl.style.setProperty('min-width', 'unset'); |
There was a problem hiding this comment.
Rather than setting this with JavaScript, you should add a custom class on line 529 above (so make that line something like menuEl.classList.add('dropdown-menu', 'mqeditor-menu');), and then add
.mqeditor-menu {
min-width: unset;
}to the mqeditor.scss file.
Also, a nicer way to do this in JavaScript is with menuEl.style.minWidth = 'unset';. Although, that is just my preference.
There was a problem hiding this comment.
Actually, I king of like just setting this in JavaScript. Just less code. So leave it as is, or change to the suggested. Either is fine.
|
Should this be delayed or not needed after the toolbar is redone, in #1417? |
|
It can be merged, but I also added this to the code in openwebwork/mathquill#46. So thanks for finding this in any case. |
|
If the issue is covered by #1417, I'll close this. Reopen if I misunderstood. |
|
It is covered by #1417, but only because you opened this pull request and I added the changes here to the changes to the toolbar code that is now part of the MathQuill code. So thanks for noticing this. |
A bootstrap class that is used with the "Disable Toolbar" popover for the MQ editor has
min-widthset to something, and it makes excess whitespace following the "Disable Toolbar".Before:
After: