diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js
index d9633e60..71f423e8 100644
--- a/content/treestyletab/config.js
+++ b/content/treestyletab/config.js
@@ -233,7 +233,7 @@ function onChangeTabbarPosition()
gTabbarPlacePositionInitialized = true;
}
-function onSyncMaxTreeLevelUIToPref(aTarget)
+function onSyncMaxTreeLevelUIToPref(aTarget, aSetPrefValue)
{
aTarget = document.getElementById(aTarget);
if (aTarget.sync)
@@ -243,6 +243,9 @@ function onSyncMaxTreeLevelUIToPref(aTarget)
var textbox = aTarget.parentNode.getElementsByTagName('textbox')[0];
var prefValue = aTarget.checked ? textbox.value : 0 ;
+ if (aSetPrefValue)
+ document.getElementById(aTarget.getAttribute('preference')).value = prefValue;
+
aTarget.sync = false;
return prefValue;
}
diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul
index 762f58f5..47ff026a 100644
--- a/content/treestyletab/config.xul
+++ b/content/treestyletab/config.xul
@@ -143,8 +143,8 @@
+ oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"
+ onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"/>
@@ -160,8 +160,8 @@
+ oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"
+ onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"/>