aboutsummaryrefslogtreecommitdiffstats
path: root/library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-10-10 14:38:45 +0200
committerMario Vavti <mario@mariovavti.com>2016-10-10 14:38:45 +0200
commit3b422406a9348582e53c17a172afa5c412100a43 (patch)
tree65ae111236d48d570f14e7d4cd11f55800f5fd07 /library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch
parentdab3495751fed06589b7d082e24c96f2188abcc6 (diff)
downloadvolse-hubzilla-3b422406a9348582e53c17a172afa5c412100a43.tar.gz
volse-hubzilla-3b422406a9348582e53c17a172afa5c412100a43.tar.bz2
volse-hubzilla-3b422406a9348582e53c17a172afa5c412100a43.zip
hotfix for readmore.js
Diffstat (limited to 'library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch')
-rw-r--r--library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch20
1 files changed, 19 insertions, 1 deletions
diff --git a/library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch b/library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch
index fd3146152..e947d8854 100644
--- a/library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch
+++ b/library/readmore.js/hubzilla-custom-fix-webkit-browsers.patch
@@ -2,12 +2,30 @@ diff --git a/library/readmore.js/readmore.js b/library/readmore.js/readmore.js
index 34a624e..51222ce 100644
--- a/library/readmore.js/readmore.js
+++ b/library/readmore.js/readmore.js
+@@ -79,7 +79,7 @@
+ maxHeight: 'none',
+ overflow: 'hidden'
+ }).insertAfter(element),
+- expandedHeight = el.outerHeight(),
++ expandedHeight = 100 + '%',
+ cssMaxHeight = parseInt(el.css({maxHeight: ''}).css('max-height').replace(/[^-\d\.]/g, ''), 10),
+ defaultHeight = element.data('defaultHeight');
+
+@@ -102,7 +102,7 @@
+ var resizeBoxes = debounce(function() {
+ $('[data-readmore]').each(function() {
+ var current = $(this),
+- isExpanded = (current.attr('aria-expanded') === 'true');
++ isExpanded = (current.height() > current.data('collapsedHeight'));
+
+ setBoxHeights(current);
+
@@ -246,7 +246,7 @@
collapsedHeight = $element.data('collapsedHeight');
if ($element.height() <= collapsedHeight) {
- newHeight = $element.data('expandedHeight') + 'px';
-+ newHeight = 100 + '%';
++ newHeight = $element.data('expandedHeight');
newLink = 'lessLink';
expanded = true;
}