From 30a8d13e0f73bb92878bdf1cc672e2a4d3f95b7b Mon Sep 17 00:00:00 2001 From: "cedric@yterium.com" <> Date: Fri, 31 Oct 2014 17:22:48 +0000 Subject: [PATCH] =?UTF-8?q?Prendre=20en=20charge=20la=20touche=20"Esc"=20p?= =?UTF-8?q?our=20sortir=20du=20plein=20ecran=20m=C3=AAme=20si=20on=20a=20p?= =?UTF-8?q?as=20mis=20le=20focus=20sur=20le=20champ=20d'edition=20(Franck)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- javascript/jquery.previsu_spip.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/javascript/jquery.previsu_spip.js b/javascript/jquery.previsu_spip.js index 9507047..65c5fb5 100644 --- a/javascript/jquery.previsu_spip.js +++ b/javascript/jquery.previsu_spip.js @@ -54,16 +54,20 @@ } var timerPreview=null; mark.addClass('livepreview').find('.markItUpEditor').bind('keyup click change focus refreshpreview',function(e){ + if (is_full_screen){ + if (timerPreview) clearTimeout(timerPreview); + timerPreview = setTimeout(refresh_preview,500); + } + }); + $(window).bind('keyup',function(e){ if (is_full_screen){ // Touche Echap pour sortir du mode fullscreen - if (e.type == 'keyup' && e.keyCode==27){ + if (e.type=='keyup' && e.keyCode==27){ mark.removeClass('fullscreen'); is_full_screen = false; } - if (timerPreview) clearTimeout(timerPreview); - timerPreview = setTimeout(refresh_preview,500); } - }) + }); } mark.find('.markItUpEditor').trigger('refreshpreview'); }