Hello,
so I made a gadget that has a lot of UserPref settings that can be changed. Within those, there is the custom_height pref I included.
<UserPref name="custom_height" datatype="hidden" default_value="400" />
In general, the height of the settings page including all UserPrefs is larger than the custom_height set by the user for the actual gadget.
Before it comes up, I am using:
<Require feature="dynamic-height" />
and in my view template I am using:
gadgets.window.adjustHeight(gadget.getPref("custom_height"));
So when I go to the settings, set a custom height and save, the gadget window displays at that exact height. But if for example I go into the settings and cancel without saving, the height stays from the settings height. When I then click refresh, and the template view function is called again, the gadget frame sets to custom height and immediately after that, sets to a greater height (maybe the settings one) which isn't defined anywhere. So it sets the right height and then bounces back. Only after saving it takes up the right height.
How can I prevent this automatic height change? Is there some event I can intercept or change? All suggestions are welcome.
Regards
Chris
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.