mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix details sneak-peek keyup
This commit is contained in:
@@ -67,13 +67,14 @@ 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
|
||||
var $details = $(this).closest("details");
|
||||
if ($details.hasClass('sneak-peek')) {
|
||||
// if sneak-peek is active, needs to be handled differently
|
||||
return true;
|
||||
}
|
||||
event.preventDefault();
|
||||
$(this).click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user