diff options
| author | brunoais <brunoaiss@gmail.com> | 2014-06-07 17:08:05 +0100 |
|---|---|---|
| committer | brunoais <brunoaiss@gmail.com> | 2014-06-07 17:08:05 +0100 |
| commit | f8a9eccb2aa3e458976ea6f45a4a78af718b120f (patch) | |
| tree | fa88e10751b1c8257b095f3d01c8fb013f3d87bb | |
| parent | fc4275ab2b414e184007a8791c7ee09537d5a827 (diff) | |
| download | forums-f8a9eccb2aa3e458976ea6f45a4a78af718b120f.tar forums-f8a9eccb2aa3e458976ea6f45a4a78af718b120f.tar.gz forums-f8a9eccb2aa3e458976ea6f45a4a78af718b120f.tar.bz2 forums-f8a9eccb2aa3e458976ea6f45a4a78af718b120f.tar.xz forums-f8a9eccb2aa3e458976ea6f45a4a78af718b120f.zip | |
[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
| -rw-r--r-- | phpBB/assets/javascript/core.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 296c5b0ef9..37728864c4 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -1201,7 +1201,11 @@ phpbb.applyCodeEditor = function(textarea) { var key = event.keyCode || event.which; // intercept tabs - if (key == 9) { + if (key == 9 && + !event.ctrlKey && + !event.shiftKey && + !event.altKey && + !event.metaKey) { if (inTag()) { appendText("\t"); event.preventDefault(); |
