From 41fb47ea559b4d1b37071d8e723b456dd4d0d02c Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 31 Jan 2024 15:40:01 +0200 Subject: [PATCH] - fix modal responsive --- assets/js/um-functions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/um-functions.js b/assets/js/um-functions.js index 972a724f..e83e324b 100644 --- a/assets/js/um-functions.js +++ b/assets/js/um-functions.js @@ -593,7 +593,11 @@ function um_modal_responsive() { if ( w <= 500 ) { modal.animate({ 'bottom' : 0 }, 300); } else { - modal.animate({ 'bottom' : half_gap }, 300); + if ( h - parseInt(half_gap) > h ) { + modal.animate({ 'bottom' : 0 }, 300); + } else { + modal.animate({ 'bottom' : half_gap }, 300); + } } } }