diff --git a/LICENSE b/LICENSE index 9ac6d77c3..c00a59d0d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.3.2 - 2013-08-15 +* appchan x - Version 2.3.2 - 2013-08-16 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 98593ebf4..4c37324f7 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -18,7 +18,7 @@ // ==/UserScript== /* -* appchan x - Version 2.3.2 - 2013-08-15 +* appchan x - Version 2.3.2 - 2013-08-16 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -7721,9 +7721,13 @@ return QR.fileInput(files); }, openFileInput: function(e) { - if (e.keyCode && e.keyCode !== 32) { + e.preventDefault(); + if (e.keyCode && ![32, 13].contains(e.keyCode)) { return; } + if (e.shiftKey && !e.keyCode) { + return QR.selected.rmFile(); + } return QR.nodes.fileInput.click(); }, fileInput: function(files) { diff --git a/builds/crx/script.js b/builds/crx/script.js index ffe1f27c4..36dfa4172 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.3.2 - 2013-08-15 +* appchan x - Version 2.3.2 - 2013-08-16 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -7733,9 +7733,13 @@ return QR.fileInput(files); }, openFileInput: function(e) { - if (e.keyCode && e.keyCode !== 32) { + e.preventDefault(); + if (e.keyCode && ![32, 13].contains(e.keyCode)) { return; } + if (e.shiftKey && !e.keyCode) { + return QR.selected.rmFile(); + } return QR.nodes.fileInput.click(); }, fileInput: function(files) { diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index 973080dbc..8d012d9fd 100644 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -441,7 +441,10 @@ QR = QR.fileInput files openFileInput: (e) -> - return if e.keyCode and e.keyCode isnt 32 + e.preventDefault() + return if e.keyCode and not [32, 13].contains e.keyCode + if e.shiftKey and not e.keyCode + return QR.selected.rmFile() QR.nodes.fileInput.click() fileInput: (files) ->