Skip to content
Snippets Groups Projects
Commit 4e06cef7 authored by Justin Toupin's avatar Justin Toupin
Browse files

Check that .ui-dialog-content exists before attempting to manipulate it

parent 4aceef18
No related branches found
No related tags found
No related merge requests found
Pipeline #453390 failed
...@@ -267,6 +267,9 @@ ...@@ -267,6 +267,9 @@
window.innerHeight || document.documentElement.clientHeight; window.innerHeight || document.documentElement.clientHeight;
if (bounding.bottom > viewPortHeight) { if (bounding.bottom > viewPortHeight) {
const $dialog = $('.ui-dialog-content', dialog); const $dialog = $('.ui-dialog-content', dialog);
if ($dialog.length === 0) {
return;
}
const height = viewPortHeight - 200; const height = viewPortHeight - 200;
$dialog.dialog('option', 'height', height); $dialog.dialog('option', 'height', height);
$dialog[0].style.overscrollBehavior = 'contain'; $dialog[0].style.overscrollBehavior = 'contain';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment