Fixed previous commit
authorAlexander Ebert <ebert@woltlab.com>
Mon, 13 May 2013 20:02:15 +0000 (22:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 13 May 2013 20:02:15 +0000 (22:02 +0200)
wcfsetup/install/files/js/WCF.js

index 24439cbadf8d8744b8880c23a21ed35cfd13a033..b666b3314d3c5719856c5dc210599b2ba27cc402 100755 (executable)
@@ -7377,7 +7377,7 @@ WCF.EditableItemList = Class.extend({
                        var $value = $.trim(this._searchInput.val());
                        
                        // read everything left from caret position
-                       if (event.which === 188) {
+                       if (event && event.which === 188) {
                                $value = $value.substring(0, this._searchInput.getCaret());
                        }
                        
@@ -7391,7 +7391,7 @@ WCF.EditableItemList = Class.extend({
                        });
                        
                        // reset input
-                       if (event.which === 188) {
+                       if (event && event.which === 188) {
                                this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret())));
                        }
                        else {