fix custom action shortcut not working

pull/75/head
ysykzheng 5 years ago
parent 8f590f4f96
commit 9e94709192

@ -122,6 +122,11 @@ function createToolbarButton(options, enableTooltips, shortcuts) {
el.setAttribute('type', 'button');
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
// Properly hande custom shortcuts
if( options.name && options.name in shortcuts ){
bindings[options.name] = options.action;
}
if (options.title && enableTooltips) {
el.title = createTooltip(options.title, options.action, shortcuts);

Loading…
Cancel
Save