From: Alexander Ebert Date: Sat, 11 Apr 2015 21:43:07 +0000 (+0200) Subject: Fixed [Enter] key for editable item lists in Firefox X-Git-Tag: 2.1.3~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e06deca4ba685082f0b3a875951b3dff2ed31c6;p=GitHub%2FWoltLab%2FWCF.git Fixed [Enter] key for editable item lists in Firefox event.charCode is 0 for enter in Firefox --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index cde4d8da72..050b859f84 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -10264,7 +10264,7 @@ WCF.EditableItemList = Class.extend({ */ _keyPress: function(event) { // 44 = [,] (charCode != keyCode) - if (event === null || event.charCode === 44 || event.charCode === $.ui.keyCode.ENTER) { + if (event === null || event.charCode === 44 || event.charCode === $.ui.keyCode.ENTER || ($.browser.mozilla && event.keyCode === $.ui.keyCode.ENTER)) { if (event !== null && event.charCode === $.ui.keyCode.ENTER && this._search) { if (this._search._itemIndex !== -1) { return false; @@ -10277,7 +10277,7 @@ WCF.EditableItemList = Class.extend({ if (event && event.charCode === 44) { $value = $value.substring(0, this._searchInput.getCaret()); } - + console.debug($value); if ($value === '') { return true; }