Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803914
D460.id1190.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
Wed, Feb 26, 9:01 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:01 AM (4 h, 58 m)
Engine
blob
Format
Raw Data
Handle
576636
Attached To
D460: INP-1840 - Reset form scroll prior to window resizing handling (bugfix)
D460.id1190.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