mirror of
https://github.com/pretix/pretix.git
synced 2026-04-30 00:22:40 +00:00
Chekout: make disabling sneak-peek more robust (#3527)
This commit is contained in:
committed by
GitHub
parent
8d58294af1
commit
f262cd632c
@@ -7,7 +7,9 @@ setup_collapsible_details = function (el) {
|
|||||||
var $elements = $("> :not(summary)", this).show().filter(':not(.sneak-peek-trigger)');
|
var $elements = $("> :not(summary)", this).show().filter(':not(.sneak-peek-trigger)');
|
||||||
var container = this;
|
var container = this;
|
||||||
|
|
||||||
if ($("> :not(summary)", this).show().filter(':not(.sneak-peek-trigger)').height() < 200) {
|
if (Array.prototype.reduce.call($elements, function (h, e) {
|
||||||
|
return h + $(e).outerHeight();
|
||||||
|
}, 0) < 200) {
|
||||||
$(".sneak-peek-trigger", this).remove();
|
$(".sneak-peek-trigger", this).remove();
|
||||||
$(container).removeClass('sneak-peek');
|
$(container).removeClass('sneak-peek');
|
||||||
container.style.removeProperty('height');
|
container.style.removeProperty('height');
|
||||||
|
|||||||
Reference in New Issue
Block a user