Merge pull request #75 from ysykzheng/master

fix custom action shortcut not working
pull/83/merge
Jeroen Akkerman 5 years ago committed by GitHub
commit 8e46c9f3c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,6 +122,11 @@ function createToolbarButton(options, enableTooltips, shortcuts) {
el.setAttribute('type', 'button'); el.setAttribute('type', 'button');
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips; 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) { if (options.title && enableTooltips) {
el.title = createTooltip(options.title, options.action, shortcuts); el.title = createTooltip(options.title, options.action, shortcuts);

Loading…
Cancel
Save