PDA

View Full Version : [CLOSED] [#639] TextField RightButtons breaks layout when field is disabled



RCN
Jan 12, 2015, 5:08 PM
On the following example, RightButton is shown as expected.



<!DOCTYPE html>
<html>
<body>
<form runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:Viewport runat="server" Layout="BorderLayout">
<Items>
<ext:Panel Title="Center" Region="Center" Html="Center Content" runat="server" />
<ext:FormPanel Title="East" Width="200" Region="East" DefaultAnchor="100%" Layout="AnchorLayout" runat="server">
<FieldDefaults LabelAlign="Top" MsgTarget="Side" />
<Items>
<ext:TextField FieldLabel="Field 1" runat="server">
<RightButtons>
<ext:Button runat="server" Icon="Add" />
</RightButtons>
</ext:TextField>
</Items>
</ext:FormPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>

http://forums.ext.net/attachment.php?attachmentid=18761&stc=1

But when field is disabled, the layout is broken


<!DOCTYPE html>
<html>
<body>
<form runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:Viewport runat="server" Layout="BorderLayout">
<Items>
<ext:Panel Title="Center" Region="Center" Html="Center Content" runat="server" />
<ext:FormPanel Title="East" Width="200" Region="East" DefaultAnchor="100%" Layout="AnchorLayout" runat="server">
<FieldDefaults LabelAlign="Top" MsgTarget="Side" />
<Items>
<ext:TextField Disabled="true" FieldLabel="Field 1" runat="server">
<RightButtons>
<ext:Button runat="server" Icon="Add" />
</RightButtons>
</ext:TextField>
</Items>
</ext:FormPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>

http://forums.ext.net/attachment.php?attachmentid=18771&stc=1

But when the field is disabled and there is no right button, everything works as expected.


<!DOCTYPE html>
<html>
<body>
<form runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:Viewport runat="server" Layout="BorderLayout">
<Items>
<ext:Panel Title="Center" Region="Center" Html="Center Content" runat="server" />
<ext:FormPanel Title="East" Width="200" Region="East" DefaultAnchor="100%" Layout="AnchorLayout" runat="server">
<FieldDefaults LabelAlign="Top" MsgTarget="Side" />
<Items>
<ext:TextField Disabled="true" FieldLabel="Field 1" runat="server" />
</Items>
</ext:FormPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>

http://forums.ext.net/attachment.php?attachmentid=18781&stc=1

Daniil
Jan 13, 2015, 2:28 PM
Hi Raphael,

Thank you for the report! We will investigate.

RCN
Jan 13, 2015, 2:59 PM
Thank you Daniil. I will investigate as well.

RaphaelSaldanha
Jan 14, 2015, 11:23 AM
I confirm that this issue is still reproducible on version 3.1.0.

Daniil
Jan 16, 2015, 1:19 PM
Created an Issue.
https://github.com/extnet/Ext.NET/issues/639

Fixed in the revision 6254 (trunk). It goes to v3.1.0 beta.

RaphaelSaldanha
Jan 16, 2015, 2:53 PM
Thank you Daniil