diff options
Diffstat (limited to 'phpBB/assets/javascript')
| -rw-r--r-- | phpBB/assets/javascript/core.js | 9 | ||||
| -rw-r--r-- | phpBB/assets/javascript/plupload.js | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 296c5b0ef9..80c44ec08f 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -7,6 +7,7 @@ phpbb.alertTime = 100; // define a couple constants for keydown functions. var keymap = { + TAB: 9, ENTER: 13, ESC: 27 }; @@ -1201,7 +1202,11 @@ phpbb.applyCodeEditor = function(textarea) { var key = event.keyCode || event.which; // intercept tabs - if (key == 9) { + if (key == keymap.TAB && + !event.ctrlKey && + !event.shiftKey && + !event.altKey && + !event.metaKey) { if (inTag()) { appendText("\t"); event.preventDefault(); @@ -1210,7 +1215,7 @@ phpbb.applyCodeEditor = function(textarea) { } // intercept new line characters - if (key == 13) { + if (key == keymap.ENTER) { if (inTag()) { var lastLine = getLastLine(true), code = '' + /^\s*/g.exec(lastLine); diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index 8ffd452a09..5445e83e15 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -586,6 +586,11 @@ uploader.bind('FilesAdded', function(up, files) { return; } + // Switch the active tab if the style supports it + if (typeof activateSubPanel == 'function') { + activateSubPanel('attach-panel'); + } + // Show the file list if there aren't any files currently. if (!$('#file-list-container').is(':visible')) { $('#file-list-container').show(100); |
