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

Toolbar button with empty link

2 Answers 634 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Dec 2018, 08:50 AM

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 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Zhekov
Telerik team
answered on 24 Dec 2018, 08:20 AM
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.
0
Peter
Top achievements
Rank 1
answered on 24 Dec 2018, 10:02 AM

Hello Ivan,

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

Peter

Tags
Toolbar
Asked by
Peter
Top achievements
Rank 1
Answers by
Ivan Zhekov
Telerik team
Peter
Top achievements
Rank 1
Share this question
or