mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Cart: Add sneak-peek preview (#3259)
This commit is contained in:
committed by
GitHub
parent
6b983d5f55
commit
38e826724f
@@ -7,6 +7,10 @@ setup_collapsible_details = function (el) {
|
||||
return true;
|
||||
}
|
||||
var $details = $(this).closest("details");
|
||||
if ($details.hasClass('sneak-peek')) {
|
||||
// if sneak-peek is active, needs to be handled differently
|
||||
return true;
|
||||
}
|
||||
var isOpen = $details.prop("open");
|
||||
var $detailsNotSummary = $details.children(':not(summary)');
|
||||
if ($detailsNotSummary.is(':animated')) {
|
||||
@@ -27,6 +31,10 @@ setup_collapsible_details = function (el) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}).keyup(function (event) {
|
||||
if ($details.hasClass('sneak-peek')) {
|
||||
// if sneak-peek is active, needs to be handled differently
|
||||
return true;
|
||||
}
|
||||
if (32 == event.keyCode || (13 == event.keyCode && !isOpera)) {
|
||||
// Space or Enter is pressed — trigger the `click` event on the `summary` element
|
||||
// Opera already seems to trigger the `click` event when Enter is pressed
|
||||
|
||||
Reference in New Issue
Block a user