Fix bug 392448 - Event/Task dialog: edited values in date/time combo boxes not always saved on "save and close" (does not prompt to save changes when dialogue is closed). r=philipp
This commit is contained in:
Родитель
7bb9ec4610
Коммит
89f741715d
|
@ -310,6 +310,11 @@ function onCommandCancel() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function onCancel() {
|
function onCancel() {
|
||||||
|
// The datepickers need to remove the focus in order to trigger the
|
||||||
|
// validation of the values just edited, with the keyboard, but not yet
|
||||||
|
// confirmed (i.e. not followed by a click, a tab or enter keys pressure).
|
||||||
|
document.documentElement.focus();
|
||||||
|
|
||||||
if (!gConfirmCancel || (gConfirmCancel && onCommandCancel())) {
|
if (!gConfirmCancel || (gConfirmCancel && onCommandCancel())) {
|
||||||
dispose();
|
dispose();
|
||||||
return true;
|
return true;
|
||||||
|
@ -2233,6 +2238,11 @@ function saveItem() {
|
||||||
* save prompt just before the window is closing.
|
* save prompt just before the window is closing.
|
||||||
*/
|
*/
|
||||||
function onCommandSave(aIsClosing) {
|
function onCommandSave(aIsClosing) {
|
||||||
|
// The datepickers need to remove the focus in order to trigger the
|
||||||
|
// validation of the values just edited, with the keyboard, but not yet
|
||||||
|
// confirmed (i.e. not followed by a click, a tab or enter keys pressure).
|
||||||
|
document.documentElement.focus();
|
||||||
|
|
||||||
let originalItem = window.calendarItem;
|
let originalItem = window.calendarItem;
|
||||||
let item = saveItem();
|
let item = saveItem();
|
||||||
let calendar = getCurrentCalendar();
|
let calendar = getCurrentCalendar();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче