mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 20:40:24 +02:00
[ticket/12672] Make tab intercept; CB for keypress only react without key mods
Changed the callback of keypress inside the <textarea> for the posting such that, if key 9 is pressed (tab character) and ctrl, shift, alt and meta are not pressed the tab is placed. Otherwise, nothing is made and default is not prevented. PHPBB3-12672
This commit is contained in:
@@ -1201,7 +1201,11 @@ phpbb.applyCodeEditor = function(textarea) {
|
|||||||
var key = event.keyCode || event.which;
|
var key = event.keyCode || event.which;
|
||||||
|
|
||||||
// intercept tabs
|
// intercept tabs
|
||||||
if (key == 9) {
|
if (key == 9 &&
|
||||||
|
!event.ctrlKey &&
|
||||||
|
!event.shiftKey &&
|
||||||
|
!event.altKey &&
|
||||||
|
!event.metaKey) {
|
||||||
if (inTag()) {
|
if (inTag()) {
|
||||||
appendText("\t");
|
appendText("\t");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
Reference in New Issue
Block a user