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

Ctrl+Click -> New Tab

1 Answer 159 Views
Menu
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 17 Nov 2020, 09:24 PM

I've been testing the Telerik Blazor out and one thing that seems to be missing is the ability to Ctrl+Click to open items in a new tab.  

Is there a way to use OnClick with event args so you can see if ctrl+click was used?

Jake
Top achievements
Rank 1
commented on 23 Nov 2021, 07:40 PM

Has this been answered someplace else?
I do not see any anchor links when using the Menu for naviagtion.
Do I have to create a template? I don't want to do that because my Nav model does the automatic binding and I don't want double navigation.

This is the HTML that get generated. (Version: 2.29.0)
Svetoslav Dimitrov
Telerik team
commented on 26 Nov 2021, 12:18 PM

Hello Jake,

To achieve the desired behavior you should indeed use the Template. Another useful thing you can do is to rename the field in the model that automatically does the binding (for example, if the name of the field is "Url" you should change it to something different). By changing the name of the field you will avoid double navigation issues.  

Jake
Top achievements
Rank 1
commented on 26 Nov 2021, 02:39 PM

Hi Svetoslav,
I did rename the field and use a template. I'm just lazy and wanted use all the automatic bindings.

Thank you.

Svetoslav Dimitrov
Telerik team
commented on 01 Dec 2021, 12:46 PM

Hello Jake,

I am happy to read that everything works as expected for you now! If you have any further questions do not hesitate to contact us!

1 Answer, 1 is accepted

Sort by
0
Svetoslav Dimitrov
Telerik team
answered on 20 Nov 2020, 09:04 AM

Hello Dustin,

As an attached file you could see an application, which references Telerik UI for Blazor 2.19.0 and has a menu component used for navigation (with URL field) in the Index page. When we render the menu the elements used for navigations are <a> tag with href attribute where you can use the Control + Click combination to open in a new browser tab. Could you run the application and if it works as expected for you, compare it against your own to see if any difference causes the issue. If this does not help or if I have misunderstood the question, could you modify the application so that the behavior is reproduced and I can investigate further?

Regards,
Svetoslav Dimitrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Menu
Asked by
n/a
Top achievements
Rank 1
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or