This is a migrated thread and some comments may be shown as answers.

Templates don't work with textboxes in firefox

5 Answers 68 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Fred Taylor
Top achievements
Rank 1
Fred Taylor asked on 15 Aug 2011, 07:04 PM
If I add a textbox or radtextbox to a template, you can't set focus to the textbox to enter text..  This work with IE7.  Testing failed with FF 3.6.1 and FF 4.01.

easy to reproduce:

<telerik:RibbonBarTemplateItem ID="templatetextbox">
    <Template>
        <asp:TextBox runat="server" ID="txtTest"></asp:TextBox>
    </Template>
</telerik:RibbonBarTemplateItem>

5 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 17 Aug 2011, 01:59 PM
Hello Fred,

This behaviour is a bug of the RadRibbonBar control. Thank you for reporting it, you can also find your Telerik point updated.

Kind regards,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Andrei
Top achievements
Rank 1
answered on 28 Sep 2011, 08:57 AM
Any news on fixing this bug? Or perhaps a workaround? I was able to set the focus and write in the textbox, if I previously right clicked the textbox; but after a left click outside the textbox, the focus is again lost. I really need to use a textbox inside the ribbon bar.

Also, I found another problem: if I add a textbox in a RibbonBarGroup along with some RibbonBarButtons that have the property Value set, in the code-behind the value received isn't the right one.
For instance, let's say I have defined a ribbon bar group like this:

<telerik:RibbonBarGroup Text="Test">
    <Items>
        <telerik:RibbonBarTemplateItem>
            <telerik:RadTextBox ID="RadTextBox1" Skin="Office2007" TextMode="SingleLine" />
        </telerik:RibbonBarTemplateItem>
        <telerik:RibbonBarButton Size="Large" Text="Test1" ImageUrl='..' Width="80px" Value="test1" />
        <telerik:RibbonBarButton Size="Large" Text="Test2" ImageUrl='..' Width="80px" Value="test2" />
        <telerik:RibbonBarButton Size="Large" Text="Test3" ImageUrl='..' Width="80px" Value="test3" />
    </Items>
</telerik:RibbonBarGroup>

And on the ribbon button click event (code behind) I have:

switch (e.Button.Value)
{
    case "test1":
    ...code...
        break;
    case "test2":
    ...code...
        break;
    case "test3":
    ...code...
        break;
}

When I press the button with Value "test1", no case is hit, when I press "test2", "test1" case is hit and when I press "test3", "test2" case is hit. So everything is shifted to the left. It appears that the textbox is somehow interpreted as a button and interferes with the normal functionality of the ribbon bar. If I remove the textbox or if I place it inside another group, everything is ok, but this is not an option for me.

Any suggestions?
0
Andrei
Top achievements
Rank 1
answered on 28 Sep 2011, 11:08 AM
For the first problem, I found a workaround: force the focus on the onclick event.
<telerik:RadTextBox ID="RadTextBox1" runat="server" onclick="this.focus();" />

For the second problem, I moved the textbox after the three buttons, but I'm not happy with this "solution". Still waiting on a proper one from you.
0
Kate
Telerik team
answered on 03 Oct 2011, 09:55 AM
Hello Andrei,

We are currently working on resolving the bug however, I can not give you any time frame when we will manage to fix it. We will let you know once we are ready with the fix.

Our apologies for the caused inconvenience.

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Kate
Telerik team
answered on 02 Nov 2011, 05:15 PM
Hi Fred Taylor,

The issue with the RadRibbonBar and the textbox has been resolved and it should be available for you to download it in the next internal build (Wednesday next week).

Please do not hesitate to contact us again should you have any other questions.


All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
RibbonBar
Asked by
Fred Taylor
Top achievements
Rank 1
Answers by
Kate
Telerik team
Andrei
Top achievements
Rank 1
Share this question
or