FIX: ensures keyboard event is not propagated when using c shortcut (#9441)

This commit is contained in:
Joffrey JAFFEUX 2020-04-16 15:45:18 +02:00 committed by GitHub
parent ed6b3b82bd
commit 1168d5c70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -283,11 +283,13 @@ export default {
});
},
createTopic() {
createTopic(event) {
if (!(this.currentUser && this.currentUser.can_create_topic)) {
return;
}
event.preventDefault();
// If the page has a create-topic button, use it for context sensitive attributes like category
let $createTopicButton = $("#create-topic");
if ($createTopicButton.length) {