]> git.mxchange.org Git - friendica.git/blobdiff - js/main.js
Frio Bugfix: clear float at the end of comment-edit
[friendica.git] / js / main.js
index 79b5aae2bc05e3bc68e91f551e84e2381e910ce8..008d84b0bf1349a9b297226f8de98c818c2bef88 100644 (file)
@@ -5,17 +5,14 @@
 
        function _resizeIframe(obj, desth) {
                var h = obj.style.height;
-               var ch = obj.contentWindow.document.body.scrollHeight + 'px';
-               if (h==ch) {
+               var ch = obj.contentWindow.document.body.scrollHeight;
+               if (h == (ch + 'px')) {
                        return;
                }
-               //console.log("_resizeIframe", obj, desth, ch);
-               if (desth!=ch) {
-                       setTimeout(_resizeIframe, 500, obj, ch);
-               } else {
-                       if (ch>0) obj.style.height  = ch;
-                       setTimeout(_resizeIframe, 1000, obj, ch);
+               if (desth == ch && ch>0) {
+                       obj.style.height  = ch + 'px';
                }
+               setTimeout(_resizeIframe, 100, obj, ch);
        }
 
        function openClose(theID) {
                function close_last_popup_menu() {
                        if(last_popup_menu) {
                                last_popup_menu.hide();
+                               last_popup_menu.off('click', function(e) {e.stopPropagation()});
                                last_popup_button.removeClass("selected");
                                last_popup_menu = null;
                                last_popup_button = null;
                                last_popup_button = null;
                        } else {
                                last_popup_menu = menu;
+                               last_popup_menu.on('click', function(e) {e.stopPropagation()});
                                last_popup_button = parent;
                                $('#nav-notifications-menu').perfectScrollbar('update');
                        }