Page MenuHomeIn-Portal Phabricator

D461.id.diff
No OneTemporary

File Metadata

Created
Sat, Jun 28, 7:29 PM

D461.id.diff

Index: core/admin_templates/js/forms.js
===================================================================
--- core/admin_templates/js/forms.js
+++ core/admin_templates/js/forms.js
@@ -201,8 +201,23 @@
}, 100);
});
+ // Record scrollTop before window contents is changed during Resize.
+ var $window_scroll_top = $(window).scrollTop();
+
this.Resize(false);
+ /*
+ * Transform window scrollTop into "#{this.Div.id}_container" scrollTop.
+ *
+ * The transformation isn't exact, because scrollable area became narrower
+ * due to the fact, that it now includes a scroll bar. That in turn introduces
+ * text wrapping, which might increase table height altogether.
+ */
+ if ( $window_scroll_top > 0 ) {
+ $(window).scrollTop(0);
+ $('#' + this.Div.id + '_container').scrollTop($window_scroll_top - $(this.Div).offset().top);
+ }
+
this.displayFirstError();
if (_Simultaneous_Edit_Message != '') {

Event Timeline