Skip to content
Snippets Groups Projects
Commit 70da604d authored by Fatih Acet's avatar Fatih Acet
Browse files

Merge branch...

Merge branch '25897-textarea-stops-accepting-space-and-return-characters-with-no-warning' into 'master'

Fix space, return and tab blocks on textareas

Closes #25897

See merge request !8218
parents 6e8ba3b7 cfcefa15
No related branches found
No related tags found
No related merge requests found
Loading
@@ -379,14 +379,7 @@
Loading
@@ -379,14 +379,7 @@
togglePreventSelection(isPrevented = !!this.setting.tabSelectsMatch) { togglePreventSelection(isPrevented = !!this.setting.tabSelectsMatch) {
this.setting.tabSelectsMatch = !isPrevented; this.setting.tabSelectsMatch = !isPrevented;
this.setting.spaceSelectsMatch = !isPrevented; this.setting.spaceSelectsMatch = !isPrevented;
const eventListenerAction = `${isPrevented ? 'add' : 'remove'}EventListener`;
this.$inputor[0][eventListenerAction]('keydown', gl.GfmAutoComplete.preventSpaceTabEnter);
}, },
preventSpaceTabEnter(e) {
const key = e.which || e.keyCode;
const preventables = [9, 13, 32];
if (preventables.indexOf(key) > -1) e.preventDefault();
}
}; };
   
}).call(this); }).call(this);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment