mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 1241436 - Update the "email me" checkbox in accordance with the email input field in the tab crash reporter. r=Felipe
MozReview-Commit-ID: EnIe7NRwMes --HG-- extra : rebase_source : 1325632b3877125347c34b7dc88e131199a508d4
This commit is contained in:
parent
b67ae659b3
commit
b9c7c1d62b
@ -86,6 +86,10 @@ var AboutTabCrashed = {
|
|||||||
this.onClick(event);
|
this.onClick(event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "input": {
|
||||||
|
this.onInput(event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -95,6 +99,9 @@ var AboutTabCrashed = {
|
|||||||
el.addEventListener("click", this);
|
el.addEventListener("click", this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// For setting "emailMe" checkbox automatically on email value change.
|
||||||
|
document.getElementById("email").addEventListener("input", this);
|
||||||
|
|
||||||
// Error pages are loaded as LOAD_BACKGROUND, so they don't get load events.
|
// Error pages are loaded as LOAD_BACKGROUND, so they don't get load events.
|
||||||
let event = new CustomEvent("AboutTabCrashedLoad", {bubbles:true});
|
let event = new CustomEvent("AboutTabCrashedLoad", {bubbles:true});
|
||||||
document.dispatchEvent(event);
|
document.dispatchEvent(event);
|
||||||
@ -126,6 +133,14 @@ var AboutTabCrashed = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onInput(event) {
|
||||||
|
switch(event.target.id) {
|
||||||
|
case "email": {
|
||||||
|
document.getElementById("emailMe").checked = !!event.target.value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* After this page tells the parent that it has loaded, the parent
|
* After this page tells the parent that it has loaded, the parent
|
||||||
* will respond with whether or not a crash report is available. This
|
* will respond with whether or not a crash report is available. This
|
||||||
|
Loading…
Reference in New Issue
Block a user