Scroll to dialog top on page change
authorAlexander Ebert <ebert@woltlab.com>
Mon, 1 Jan 2018 15:02:34 +0000 (16:02 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 1 Jan 2018 15:02:34 +0000 (16:02 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/List.js

index 9dd00b805f118e9c774a970d0c82c4dae3e5e06c..7cb5adb5a404174d9511b717df6f42d522ca028d 100644 (file)
@@ -66,6 +66,12 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'Ui/Dialog', 'WoltLabSuite/Cor
                                                        callbackSwitch: this._showPage.bind(this)
                                                });
                                        }
+                                       
+                                       // scroll to the list start
+                                       var container = dialog.content.parentNode;
+                                       if (container.scrollTop > 0) {
+                                               container.scrollTop = 0;
+                                       }
                                }
                        }
                        else {