aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpafcu <pafcu@iki.fi>2015-01-15 23:17:06 +0200
committerpafcu <pafcu@iki.fi>2015-01-15 23:17:06 +0200
commitf9f23bd6c9b50e209f57e6cf8fde6846f214468f (patch)
treed316585bb5f6cf6d51d505b3516708c75d78b3a8
parent6089038407c5c418b6ce399b311a55dc0b9ec421 (diff)
parent478a612aeb7cc08f8c1b918c588aadb1330f383e (diff)
downloadvolse-hubzilla-f9f23bd6c9b50e209f57e6cf8fde6846f214468f.tar.gz
volse-hubzilla-f9f23bd6c9b50e209f57e6cf8fde6846f214468f.tar.bz2
volse-hubzilla-f9f23bd6c9b50e209f57e6cf8fde6846f214468f.zip
Merge pull request #854 from pafcu/fixcollapse
Actually fix problem with post collapsing in webkit-based browsers
-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 = '',