not checkrender if a mailgo is showing

This commit is contained in:
Matteo Manzinello 2019-09-17 00:23:41 +02:00
parent 12db39dad0
commit c60c75bece

View File

@ -562,6 +562,9 @@ const mailgoCheckRender = event => {
) )
return; return;
// if a mailgo is already showing do nothing
if (mailgoIsShowing(MAIL_TYPE) || mailgoIsShowing(TEL_TYPE)) return;
// the path of the event // the path of the event
let path = let path =
event.path || event.path ||
@ -570,7 +573,6 @@ const mailgoCheckRender = event => {
if (path) { if (path) {
path.forEach(element => { path.forEach(element => {
console.log(element);
if (element instanceof HTMLDocument || element instanceof Window) return; if (element instanceof HTMLDocument || element instanceof Window) return;
// go in the event.path to find if the user has clicked on a mailgo element // go in the event.path to find if the user has clicked on a mailgo element
@ -603,10 +605,8 @@ const mailgoCheckRender = event => {
* function to manage the keydown event when the modal is showing * function to manage the keydown event when the modal is showing
*/ */
const mailgoKeydown = event => { const mailgoKeydown = event => {
console.log(event);
// if mailgo is showing // if mailgo is showing
if (mailgoIsShowing(MAIL_TYPE)) { if (mailgoIsShowing(MAIL_TYPE)) {
console.log("son qui");
switch (event.keyCode) { switch (event.keyCode) {
case 27: case 27:
// Escape // Escape