aboutsummaryrefslogtreecommitdiffstats
path: root/library/readmore.js
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2015-01-15 22:08:50 +0100
committerStefan Parviainen <saparvia@caterva.eu>2015-01-15 22:08:50 +0100
commit478a612aeb7cc08f8c1b918c588aadb1330f383e (patch)
treef78efa3d137ec673630a1207ccfa8b4305ec341a /library/readmore.js
parent47a2668b30de34f1f08983ba485a630a89a9dd1e (diff)
downloadvolse-hubzilla-478a612aeb7cc08f8c1b918c588aadb1330f383e.tar.gz
volse-hubzilla-478a612aeb7cc08f8c1b918c588aadb1330f383e.tar.bz2
volse-hubzilla-478a612aeb7cc08f8c1b918c588aadb1330f383e.zip
Actually fix problem with post collapsing in webkit-based browsers
Diffstat (limited to 'library/readmore.js')
-rw-r--r--library/readmore.js/readmore.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/library/readmore.js/readmore.js b/library/readmore.js/readmore.js
index 714e64fe7..e790ceb76 100644
--- a/library/readmore.js/readmore.js
+++ b/library/readmore.js/readmore.js
@@ -61,18 +61,12 @@
}
function setBoxHeights(element) {
- var el = element.clone().css({
- height: 'auto',
- width: element.width(),
- maxHeight: 'none',
- overflow: 'hidden'
- }).insertAfter(element),
+ var el = element,
expandedHeight = el.outerHeight(),
cssMaxHeight = parseInt(el.css({maxHeight: ''}).css('max-height').replace(/[^-\d\.]/g, ''), 10),
defaultHeight = element.data('defaultHeight');
- el.remove();
-
+console.log("el height: " + expandedHeight);
var collapsedHeight = element.data('collapsedHeight') || defaultHeight;
if (!cssMaxHeight) {
@@ -206,10 +200,6 @@
}
}
});
-
- window.addEventListener('resize', function() {
- resizeBoxes();
- });
},
toggle: function(trigger, element, event) {
@@ -225,8 +215,6 @@
element = this.element;
}
- setBoxHeights($(element)); // Workaroud for problems with collapse
-
var $this = this,
$element = $(element),
newHeight = '',