Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727109
D460.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 6:54 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 6:54 AM (3 d, 3 h ago)
Engine
blob
Format
Raw Data
Handle
537171
Attached To
D460: INP-1840 - Reset form scroll prior to window resizing handling (bugfix)
D460.diff
View Options
Index: core/admin_templates/js/forms.js
===================================================================
--- core/admin_templates/js/forms.js
+++ core/admin_templates/js/forms.js
@@ -291,7 +291,7 @@
var h = (document.all ? window.document.body.offsetHeight : window.innerHeight);
var $div = $(this.Div);
- var pos = this.GetOffsetWithoutUserScroll($div);
+ var pos = this.GetOffsetWithoutUserScroll($div, $init_done);
h -= pos.top;
@@ -370,15 +370,18 @@
// print_pre(this.Controls)
};
-Form.GetOffsetWithoutUserScroll = function ($div) {
- var $ret,
- $wrapper_div = $div.parent(),
- $old_scroll_top = $wrapper_div.scrollTop();
+Form.GetOffsetWithoutUserScroll = function ($div, $init_done) {
+ var $ret, $wrapper_div, $old_scroll_top;
- $wrapper_div.scrollTop(0);
+ if ( $init_done === false ) {
+ return $div.offset();
+ }
- $ret = $div.offset();
+ $wrapper_div = $div.parent();
+ $old_scroll_top = $wrapper_div.scrollTop();
+ $wrapper_div.scrollTop(0);
+ $ret = $div.offset();
$wrapper_div.scrollTop($old_scroll_top);
return $ret;
Event Timeline
Log In to Comment