mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Escape permet d'annuler la séléction courante
This commit is contained in:
parent
ff1c0b5cfb
commit
a496f122dc
@ -492,6 +492,17 @@ loadingTask.promise.then(function(pdf) {
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if(event.key == 'Escape' && (event.target.tagName == "BODY" || event.target.name == "svg_2_add")) {
|
||||
var input_selected = document.querySelector('input[name="svg_2_add"]:checked');
|
||||
if(!input_selected) {
|
||||
return;
|
||||
}
|
||||
input_selected.checked = false;
|
||||
stateAddLock(false);
|
||||
input_selected.dispatchEvent(new Event("change"));
|
||||
input_selected.blur();
|
||||
return;
|
||||
}
|
||||
if(event.target.tagName != "BODY") {
|
||||
return;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div id="container-pages" style="overflow: auto" class="col-12 pt-1 pb-1 text-center vh-100">
|
||||
</div>
|
||||
<div style="height: 55px;" class="d-md-none"></div>
|
||||
<div class="offcanvas offcanvas-end show d-none d-md-block shadow-sm" data-bs-backdrop="false" data-bs-scroll="true" data-keyboard="false" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel" style="width: 350px;">
|
||||
<div class="offcanvas offcanvas-end show d-none d-md-block shadow-sm" data-bs-backdrop="false" data-bs-scroll="true" data-bs-keyboard="false" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel" style="width: 350px;">
|
||||
<div class="offcanvas-header mb-0 pb-0">
|
||||
<h5 id="offcanvasTopLabel">Signature du PDF</h5>
|
||||
<button type="button" class="btn-close text-reset d-md-none" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
|
Loading…
Reference in New Issue
Block a user