From 9ba7a68578d98b7a5040c14be45aaac297a5226e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 8 Jan 2019 19:23:06 +0100 Subject: [PATCH] Fixed modal height and positioning on screen --- platypush/backend/http/static/js/application.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platypush/backend/http/static/js/application.js b/platypush/backend/http/static/js/application.js index 9a87e6a14..ecedb7bb4 100644 --- a/platypush/backend/http/static/js/application.js +++ b/platypush/backend/http/static/js/application.js @@ -149,6 +149,12 @@ $(document).ready(function() { $('body').on('mouseup touchend', '[data-modal]', function(event) { var $source = $(event.target); var $modal = $($source.data('modal')); + $modal.height($(document).height() + 2); + + var $container = $modal.find('.modal-container'); + var top = 40 + $(window).scrollTop(); + $container.css('margin-top', top + 'px'); + $modal.fadeIn(); }); };