Improve snapshot modal to support mobile devices

This commit is contained in:
yflory 2020-09-30 12:53:21 +02:00
parent 4ca84c57a1
commit 76a42ea8b1
2 changed files with 6 additions and 2 deletions

View file

@ -163,7 +163,7 @@
margin-right: @snapshot_spacing; margin-right: @snapshot_spacing;
} }
} }
&:hover { &:hover, &:focus, &:focus-within {
.cp-snapshot-buttons { .cp-snapshot-buttons {
display: flex; display: flex;
} }

View file

@ -3354,7 +3354,7 @@ define([
} }
}); });
return h('span.cp-snapshot-element', [ return h('span.cp-snapshot-element', {tabindex:0}, [
h('i.fa.fa-camera'), h('i.fa.fa-camera'),
h('span.cp-snapshot-title', [ h('span.cp-snapshot-title', [
h('span', s.title), h('span', s.title),
@ -3400,6 +3400,10 @@ define([
modal = UI.openCustomModal(UI.dialog.customModal(content, {buttons: buttons })); modal = UI.openCustomModal(UI.dialog.customModal(content, {buttons: buttons }));
setTimeout(function () { setTimeout(function () {
if (list.length) {
$(list[0]).focus();
return;
}
$input.focus(); $input.focus();
}); });
}; };