lively icon indicating copy to clipboard operation
lively copied to clipboard

When use CefSharp and website as wallpaper, click link cannot call the browser but use just the CefSharp.

Open char-46 opened this issue 1 year ago • 8 comments

The situation is as described in the title.

Exactly behavior is calling system browser like Edge or Chrome. When use Webview2, things are going to expected.

char-46 avatar May 14 '23 18:05 char-46

This is intentional, there are some differences in configuration you can read here: https://github.com/rocksdanister/lively/wiki/Web-Player#cef-chromium-embedded-framework

What is your use case for opening links from wallpaper in system browser?

rocksdanister avatar May 15 '23 02:05 rocksdanister

use case like these

<a href="https://github.com"><h1>a tag with href attribute</h1></a>
<a href="https://github.com" target="_blank"><h1>a tag with href attribute and target="_blank"</h1></a>
<button onclick="javascript:window.open('https:\/\/github.com')"><h1>javascript:window.open</h1></button>
<button onclick="javascript:window.open('https:\/\/github.com', '_blank')"><h1>javascript:window.open target='_blank'</h1></button>

When use CefSharp, they all just let the screen be a browser but not use system browser to open link.

char-46 avatar May 15 '23 08:05 char-46

Attribution hyperlink can be added in wallpaper metadata: image

rocksdanister avatar May 15 '23 08:05 rocksdanister

the usage scenarios is I create a toolbox html like the browser new tab, than can use like wallpaper change each hour or just click a button to open the tool page. I mean, more interactive in wallpaper but not just show system info on the screen.

--------------raw-------------- 发件人:"Dani John @.>; 发送时间:2023年5月15日(星期一) 下午4:55 收件人:"rocksdanister/lively" @.>; 抄送:"char46 @.>;"Author @.>; 主题:Re: [rocksdanister/lively] When use CefSharp and website as wallpaper, click link cannot call the browser but use just the CefSharp. (Issue #1711)

Attribution hyperlink can be added in wallpaper metadata:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

char-46 avatar May 15 '23 09:05 char-46

The recommended way to do that is by implementing Lively Properties: https://github.com/rocksdanister/lively/wiki/Web-Guide-IV-:-Interaction#lively-properties

image

rocksdanister avatar May 15 '23 09:05 rocksdanister

Not only set properties for wallpaper, but I also mean more browser apps. Like I using iTab(it developed to browser new tab) as wallpaper (Because it easily to implement much different things like clock, calendar, the wallpaper change each hour, even calculator and so far. Sync my cloud Settings to different browsers for work, home, school, etc.), when I use Edge Webview2 and I click a link on the page, the Edge will be called and open URL which link reference.

char-46 avatar May 15 '23 11:05 char-46

I am not sure I fully understand the use case 😅

For WebView2 implementation it is set to open in default browser when <a href="..." target="_blank"> and WebView2 itself if target is not _blank.. is this the behavior you want?

https://github.com/rocksdanister/lively/blob/a7bd488362fe509012d07ea9224a86dd892205a3/src/Lively/Lively.PlayerWebView2/MainWindow.xaml.cs#L119-L126

rocksdanister avatar May 16 '23 11:05 rocksdanister

I think this is exactly the behavior I was expecting.

char-46 avatar May 17 '23 19:05 char-46