fix bug with keydownlistener
This commit is contained in:
parent
f5d7bef15c
commit
ca785d6be8
7
dist/mailgo.js
vendored
7
dist/mailgo.js
vendored
@ -232,9 +232,9 @@ var mailgoRender = function mailgoRender(mailgo) {
|
|||||||
|
|
||||||
showMailgo(); // listener keyDown
|
showMailgo(); // listener keyDown
|
||||||
|
|
||||||
mailgo.addEventListener("keydown", function () {
|
document.addEventListener("keydown", function () {
|
||||||
return mailgoKeydown(mail, cc, bcc, subject, bodyMail, url, mailtoHref, encEmail, copyButton);
|
return mailgoKeydown(mail, cc, bcc, subject, bodyMail, url, mailtoHref, encEmail, copyButton);
|
||||||
}, false);
|
});
|
||||||
}; // actions
|
}; // actions
|
||||||
|
|
||||||
|
|
||||||
@ -305,7 +305,8 @@ var mailgoCheckRender = function mailgoCheckRender(event) {
|
|||||||
|
|
||||||
|
|
||||||
var mailgoKeydown = function mailgoKeydown(mail, cc, bcc, subject, bodyMail, url, mailtoHref, encEmail, copyButton) {
|
var mailgoKeydown = function mailgoKeydown(mail, cc, bcc, subject, bodyMail, url, mailtoHref, encEmail, copyButton) {
|
||||||
// if mailgo is not showing do nothing
|
console.log("keydown"); // if mailgo is not showing do nothing
|
||||||
|
|
||||||
if (!mailgoIsShowing()) return;
|
if (!mailgoIsShowing()) return;
|
||||||
|
|
||||||
switch (event.keyCode) {
|
switch (event.keyCode) {
|
||||||
|
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
@ -289,9 +289,7 @@ const mailgoRender = mailgo => {
|
|||||||
showMailgo();
|
showMailgo();
|
||||||
|
|
||||||
// listener keyDown
|
// listener keyDown
|
||||||
mailgo.addEventListener(
|
document.addEventListener("keydown", () =>
|
||||||
"keydown",
|
|
||||||
() =>
|
|
||||||
mailgoKeydown(
|
mailgoKeydown(
|
||||||
mail,
|
mail,
|
||||||
cc,
|
cc,
|
||||||
@ -302,8 +300,7 @@ const mailgoRender = mailgo => {
|
|||||||
mailtoHref,
|
mailtoHref,
|
||||||
encEmail,
|
encEmail,
|
||||||
copyButton
|
copyButton
|
||||||
),
|
)
|
||||||
false
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -399,6 +396,7 @@ const mailgoKeydown = (
|
|||||||
encEmail,
|
encEmail,
|
||||||
copyButton
|
copyButton
|
||||||
) => {
|
) => {
|
||||||
|
console.log("keydown");
|
||||||
// if mailgo is not showing do nothing
|
// if mailgo is not showing do nothing
|
||||||
if (!mailgoIsShowing()) return;
|
if (!mailgoIsShowing()) return;
|
||||||
switch (event.keyCode) {
|
switch (event.keyCode) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user