Submit pagination dialog with ENTER
authorMatthias Schmidt <gravatronics@live.com>
Fri, 18 Apr 2014 08:57:43 +0000 (10:57 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 18 Apr 2014 08:57:43 +0000 (10:57 +0200)
wcfsetup/install/files/js/WCF.js

index 856209b91b78c444454fa64cc13e895480890837..735b904b93b7fb8c1c031d6462731f2eda6f0a2e 100755 (executable)
@@ -7029,8 +7029,15 @@ WCF.System.PageNavigation = {
        
        /**
         * Validates the page No input.
+        *
+        * @param       Event           event
         */
-       _keyUp: function() {
+       _keyUp: function(event) {
+               if (event.which == $.ui.keyCode.ENTER && !this._button.prop('disabled')) {
+                       this._submit();
+                       return;
+               }
+               
                var $pageNo = parseInt(this._pageNo.val()) || 0;
                if ($pageNo < 1 || $pageNo > this._pageNo.attr('max')) {
                        this._button.disable();