Commit 587ff771 authored by Fatih Acet's avatar Fatih Acet Committed by Douglas Barbosa Alexandre

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
parent 2ba7ce99
......@@ -373,14 +373,7 @@
togglePreventSelection(isPrevented = !!this.setting.tabSelectsMatch) {
this.setting.tabSelectsMatch = !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);
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