Toolbar button with empty link

3 posts, 1 answers
  1. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 21 Dec 2018 Link to this post

    Hi,

    a Toolbar  Button  without url is created as <a href="" ...

    See http://dojo.telerik.com/aBiHumiR and inspect the button in toolbar1.

    For the browser this is a link and the user can open the context menu for the links (open in new tab/windows, ...)

    And in my css I have styles for links (i.e. a:any-link ) which will also apply to <a href="". For this I could exlude the button with a:any-link:not(.k-button).

    But it would be better, that href="" is ommited if no url is defined. So I remove it in toolbar2 with
    $("#toolbar2 a").removeAttr("href");

    And this not work for the buttons in the overflow menu - make the run pane smaller in the dojo.

    Is there an option in kendoToolBar / type="button" to omitt href="" ?

    Peter

     

     


  2. Answer
    Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    651 posts

    Posted 24 Dec 2018 Link to this post

    Hello, Peter.

    We are keeping the buttons in kendo toolbar to be anchors (or links), mostly for legacy reasons.

    We have, however, a configuration that does exactly what you need: useButtonTag. The property is not yet documented, but I've logged it for documentation.

    In the mean time, you can see the property in action in this dojo -- http://dojo.telerik.com/@joneff/ugatasaK.

    On a side note, about the selectors, we are trying to keep them as light as possible, because we want developers, such as yourself, to be able to easily customize them.

    Regards,
    Ivan Zhekov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 24 Dec 2018 in reply to Ivan Zhekov Link to this post

    Hello Ivan,

    Perfect. Thank you. Please add useButtonTag also to the typescript definiton kendo.all.d.ts.

    Peter

Back to Top