Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions htdocs/js/MathQuill/mqeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@

const menuEl = document.createElement('ul');
menuEl.classList.add('dropdown-menu');
menuEl.style.setProperty('min-width', 'unset');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

const li = document.createElement('li');
menuEl.append(li);
const action = document.createElement('a');
Expand Down
Loading