Skip to content
Snippets Groups Projects
Commit 44bc1e41 authored by Angie Byron's avatar Angie Byron
Browse files

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
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment