From 1a17ef392db41785d0ebe005ff0689aacfa8954f Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Tue, 4 Jun 2013 12:00:21 +0300 Subject: [PATCH] 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 --- resources/js/ext.uls.inputsettings.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 0d8456fe..d5fcdd98 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -516,6 +516,9 @@ // closure for not losing the scope inputSettings.onSave( result ); } ); + + // Update the back-up preferences for the case of canceling + this.savedRegistry = $.extend( true, {}, $.ime.preferences.registry ); } };