mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
Fixed keyboard shortcut for opening search
refs https://github.com/TryGhost/Team/issues/1665 - fix browser hijack of cmd/ctrl + k shortcut for search
This commit is contained in:
parent
4743c3939f
commit
52d00ecc72
@ -63,10 +63,12 @@ export default class App extends React.Component {
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
this.handleKeyDown = (e) => {
|
||||
if (e.keyCode === 75 && e.metaKey) {
|
||||
if (e.key === 'k' && e.metaKey) {
|
||||
this.setState({
|
||||
showPopup: true
|
||||
});
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user