Properly save back-up preferences for repeated canceling

Before this patch, this scenarios didn't yield the expected result:

1) Disable IME, click Apply 2) Enable IME, click Cancel

The expected result is that IME would be disabled, but it was enabled.

This patch re-stashes the preferences when they are saved, so
the last saved preferences are loaded when pressing Cancel.

Change-Id: Ic7abdab165e367d970e6568ba69b25bf7d4f675a
This commit is contained in:
Amir E. Aharoni
2013-06-04 12:00:21 +03:00
parent 361eb95f33
commit 1a17ef392d

View File

@@ -516,6 +516,9 @@
// closure for not losing the scope // closure for not losing the scope
inputSettings.onSave( result ); inputSettings.onSave( result );
} ); } );
// Update the back-up preferences for the case of canceling
this.savedRegistry = $.extend( true, {}, $.ime.preferences.registry );
} }
}; };