Mozilla specific tool tip

5 posts, 0 answers
  1. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 15 Feb 2012 Link to this post

    I have a bunch of RADNumeric textboxes which use Access Keys
    I put a tool tip in for the access keys
    only problem - access keys need a shift key in Firefox
    Alt + P is really Shift + Alt + P

    any recommendation as to how / where to fix?
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 16 Feb 2012 Link to this post

    Hi Marianne,

    I searched the web and I found this page:
    http://reference.sitepoint.com/html/a/accesskey
    If the information is correct then not only it differs in Firefox and IE, but also in Safari on MAC and Opera.
    There is also pretty much detailed information in Wikipedia, and it looks like to be a browser specific and can not changed in general way.

    Regards,
    Vasil
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 16 Feb 2012 Link to this post

    I must not have been specific about the problem
    I know access keys vary depending on the browser
    my problem is that the Tool Tips are for the access keys for IE

    what and where do I go about "fixing" the Tool Tips for the browser
    if the user is in Firefox the tool tips are wrong
  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 17 Feb 2012 Link to this post

    Hi,

    You could change the title (tooltip) dynamically ClientSide when initializing the TextBoxes using the code below.

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <script type="text/javascript">
      function fixTooltips(sender, args)
      {
        if ($telerik.isFirefox)
        {
          sender._textBoxElement.title = "Shift + " + sender._textBoxElement.title;
          if (sender._displayElement)
          {
            sender._displayElement.title = sender._textBoxElement.title;
          }
        }
      }
    </script>
      <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ToolTip="Alt + P"
        ClientEvents-OnLoad="fixTooltips">
      </telerik:RadNumericTextBox>


    Kind regards,
    Vasil
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 17 Feb 2012 Link to this post

    thanks!
    as it turns out...
    the access keys were on the RADbutton next to the RADNumericTextBoxes...
    so I had to adjust them in code
    Chrome and Safari work the same way as IE - and Opera is just whacked
    in the Page Load, initial
    HttpBrowserCapabilities Lugs = Request.Browser;
    if (Lugs.Type.StartsWith("Firefox"))
    {
        rbFindItem.ToolTip = "Shift + " + rbFindItem.ToolTip;
        rbPage.ToolTip = "Shift + " + rbPage.ToolTip;
        rbOrderCode.ToolTip = "Shift + " + rbOrderCode.ToolTip;
    }
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017