Declined
Last Updated: 23 Jul 2024 10:06 by ADMIN
Fandy Backers
Created on: 21 Jul 2024 20:34
Category: UI for .NET MAUI
Type: Feature Request
0
webview opens external links in the same webview

Asking for a webview which opens external links ( links with a target= element) in the same webview instead of it does do nothing onbios and android, but in windows opens it a browser window with that url of the link!

we need the functionality to overrule the target= function of a link. To the same webview. At this moment we need a hybridwebview functionality! And it would be very handy to have that in a telerik control!

best regards, Fandy

3 comments
ADMIN
Didi
Posted on: 23 Jul 2024 10:06

Hello Fandy,

Thank you for the additional details. It seems the requirement you are looking for is for the .NET MAUI WebView control. I can suggest you open a feature request to the .NET MAUI GitHub repo for this. Here is a link to the repo: https://github.com/dotnet/maui 

Telerik MAUI does not provide a WebView control. The control we have is a RichTextEditor and it uses the WebView internally. Still when opening a link, the link navigates to the browser. So this is the behavior and the way how the working with hyperlinks is implemented.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Fandy Backers
Posted on: 22 Jul 2024 12:02

Yana,

The problem is that it opens links to websites that are not its source! but it doesn't open in the same webview when there is a target specified. if the same link is given in the webview without a target="_blank" or whatever they have added, the link does nothing. instead of opening in the same webview.

I think this would be a great use to add to your controls. I had the same problem with my .NET pdf viewer for ASPNET AJAX. I had to wait for 3 years when it finally was added in the controls itself. in the meanwhile i could not wait for something i not know if it will be added to the controls. so I had made a workaround and made my pdf viewer myself.. and that i also did for some other controls. But i already am searching for 2 weeks for a solution, but all the solutions i found doesn;t work or are to complicated to add.. 

For instance the solution you gave me, is a project what is already at preview 6 but the example is on preview 2. but it doesn't do what it need to do. is opening the link in the same webview..

best regards,

Fandy Backers

ADMIN
Yana
Posted on: 22 Jul 2024 07:43

Hello Fandy,

I am afraid I am going to decline this feature request as this is related to the way the .NET MAUI WebView works - it's more of an application logic involved here to customize the way the external links are handled in WebView. Please take a look at the following discussion in MS Docs, which I think would be helpful:

Why is it that the .NET MAUI WebView is unable to open links to websites that are not its source?

You can check whether OnNavigating event of the WebView is triggered and implement the suggested solution. 

Let me know if I can help with anything else.

Regards,
Yana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.