Dec 02, 2009, 3:19 PM
[0.8.1] Possible Anchor Bug
Hi,
I was using anchors inside a form layout to display elements, including a button. If I set a horizontal width on the anchor for the button, it created errors with any code after that.
I tried to find out if the Button was not supposed to be placed directly in an anchor, but I didn't find anything at extjs or here saying that. If the button is placed in a Panel and then in the anchor, everything renders correctly.
Here is some simplified code:
This may be by design, but as I said I didn't see anything in the ExtJS or here about not using anchor on a button. If it is, my apologies for the misunderstanding.
I was using anchors inside a form layout to display elements, including a button. If I set a horizontal width on the anchor for the button, it created errors with any code after that.
I tried to find out if the Button was not supposed to be placed directly in an anchor, but I didn't find anything at extjs or here saying that. If the button is placed in a Panel and then in the anchor, everything renders correctly.
Here is some simplified code:
<ext:Window ID="Window3" runat="server" Width="300">
<Body>
<ext:Panel ID="Panel10" runat="server" Border="false" Header="false">
<Defaults>
<ext:Parameter Name="MsgTarget" Value="side" />
</Defaults>
<Body>
<ext:FormLayout ID="FormLayout4" runat="server" LabelAlign="Top">
<ext:Anchor Horizontal="92%">
<ext:Button runat="server" Text="Save Me" />
</ext:Anchor>
</ext:FormLayout>
</Body>
</ext:Panel>
</Body>
</ext:Window>
<ext:Window ID="Window4" runat="server" Width="300">
<Body>
<ext:Panel ID="Panel11" runat="server" Border="false" Header="false" />
</Body>
</ext:Window>
I think that should reproduce the error I received. basically when trying to do anything on the next window I received a javascript error that it isn't a function.This may be by design, but as I said I didn't see anything in the ExtJS or here about not using anchor on a button. If it is, my apologies for the misunderstanding.