Commit 44bc1e41 authored by webchick's avatar webchick

Issue #2888305 by drpal, tedbow: In Settings Tray the when form is longer than...

Issue #2888305 by drpal, tedbow: In Settings Tray the when form is longer than page body it is tricky to scroll to the very bottom
parent 75e86c97
......@@ -31,6 +31,7 @@
const offsets = displace.offsets;
const $element = event.data.$element;
const $widget = $element.dialog('widget');
const $elementScroll = $element.scrollTop();
const adjustedOptions = {
// @see http://api.jqueryui.com/position/
......@@ -49,6 +50,9 @@
$element
.dialog('option', adjustedOptions)
.trigger('dialogContentResize.off-canvas');
// Reset the elements scroll position after being repositioned.
$element.scrollTop($elementScroll);
}
/**
......
......@@ -16,6 +16,7 @@
var offsets = displace.offsets;
var $element = event.data.$element;
var $widget = $element.dialog('widget');
var $elementScroll = $element.scrollTop();
var adjustedOptions = {
position: {
......@@ -31,6 +32,8 @@
});
$element.dialog('option', adjustedOptions).trigger('dialogContentResize.off-canvas');
$element.scrollTop($elementScroll);
}
function handleDialogResize(event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment