Use history.replaceState() to avoid browser scrolling
authorAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 22:34:11 +0000 (00:34 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jul 2016 22:34:11 +0000 (00:34 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/Reply.js

index 2ad6fe0715b2d05292fbcf6ac935c773fd4dcb16..84934df5cf25ca4ac5e1c62d93c6b43a910a34fd 100644 (file)
@@ -238,7 +238,7 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/U
                                        //noinspection JSUnresolvedVariable
                                        elData(this._container, 'last-post-time', data.returnValues.lastPostTime);
                                        
-                                       window.location.hash = elementId;
+                                       window.history.replaceState(undefined, '', '#' + elementId);
                                        UiScroll.element(elById(elementId));
                                }