@situphen 's review

dropdown_wip
firm1 4 years ago
parent 98fbe56248
commit eea2917be1

@ -323,7 +323,7 @@
position: absolute;
background-color: #f9f9f9;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 8px 8px;
padding: 8px;
z-index: 2;
}

@ -114,7 +114,7 @@ function fixShortcut(name) {
* Create dropdown block
*/
function createToolbarDropdown(options, enableTooltips, shortcuts, parent) {
var el = createToolbarButton(options, enableTooltips, shortcuts, 'div');
var el = createToolbarButton(options, enableTooltips, shortcuts, 'div', parent);
el.className += ' easymde-dropdown';
var content = document.createElement('div');
content.className = 'easymde-dropdown-content';
@ -2282,12 +2282,10 @@ EasyMDE.prototype.createToolbar = function (items) {
var el;
if (item === '|') {
el = createSep();
} else if (item.children) {
el = createToolbarDropdown(item, self.options.toolbarTips, self.options.shortcuts, self);
} else {
if (item.children) {
el = createToolbarDropdown(item, self.options.toolbarTips, self.options.shortcuts, self);
} else {
el = createToolbarButton(item, self.options.toolbarTips, self.options.shortcuts, 'button', self);
}
el = createToolbarButton(item, self.options.toolbarTips, self.options.shortcuts, 'button', self);
}

Loading…
Cancel
Save