Commit 4ee29e89 authored by Phil Hughes's avatar Phil Hughes

fixed shortcuts not working on some pages

parent b69d7ac3
......@@ -302,7 +302,7 @@ import Activities from './activities';
window.mergeRequest = new MergeRequest({
action: mrShowNode.dataset.mrAction,
});
console.log('asd');
shortcut_handler = new ShortcutsIssuable(true);
break;
case 'dashboard:activity':
......
......@@ -13,12 +13,10 @@ Mousetrap.stopCallback = (e, element, combo) => {
};
export default class Shortcuts {
constructor(skipResetBindings) {
constructor() {
this.onToggleHelp = this.onToggleHelp.bind(this);
this.enabledHelp = [];
if (!skipResetBindings) {
Mousetrap.reset();
}
Mousetrap.bind('?', this.onToggleHelp);
Mousetrap.bind('s', Shortcuts.focusSearch);
Mousetrap.bind('f', this.focusFilter.bind(this));
......
import Mousetrap from 'mousetrap';
import _ from 'underscore';
import Sidebar from './right_sidebar';
import ShortcutsNavigation from './shortcuts_navigation';
import Shortcuts from './shortcuts';
import { CopyAsGFM } from './behaviors/copy_as_gfm';
export default class ShortcutsIssuable extends ShortcutsNavigation {
export default class ShortcutsIssuable extends Shortcuts {
constructor(isMergeRequest) {
super();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment