-
Notifications
You must be signed in to change notification settings - Fork 12
DES-16866 - Handle mouse middle button click #157
Conversation
@@ -71,7 +71,7 @@ | |||
</ItemGroup> | |||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
<PropertyGroup> | |||
<PostBuildEvent>call "$(VS120COMNTOOLS)\vsvars32.bat" | |||
<PostBuildEvent>call "$(VS140COMNTOOLS)\vsvars32.bat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to VS2015.
bool ICefWebBrowserInternal.OnOpenUrlFromTab(CefBrowser browser, CefFrame frame, string targetUrl, CefWindowOpenDisposition targetDisposition, bool userGesture) | ||
{ | ||
CefUrlParts parts; | ||
if (CefRuntime.ParseUrl(targetUrl, out parts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate URL before launch it.
return clean; | ||
} | ||
|
||
public static string GetDefaultBrowserPath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Process.Start("url") has problem when dealing with some Browsers like Firefox for instance.
In order to prevent this error, a get default browser method is needed. Source is: http://www.seirer.net/blog/2014/6/10/solved-how-to-open-a-url-in-the-default-browser-in-csharp
a click should eventually call this code and paragon already has code 'OpenUrl' to cause opening in default browser... https://github.com/SymphonyOSF/SFE-Client-App/blob/dev/src/js/extensions/appBridge.js#L236 above code in appBridge should be hit when doing left click. please check why it is not getting hit in JS code when middle click is performed. i don't have a three button mouse here so can't check. |
@lneir , openUrl is not call when doing middle click, which is understood as open in new tab. |
why is that? this is just an on 'click' event and should work - please investigate. |
@lneir , it seems that since CEF v55, the "click" event is fired only for left click on mouse. |
so is this a CEF bug? what happens in the browser? |
Well, it is a new feature. Our implementation, though, only include listener for the "click" event. Chrome, for instance, implements it like here as a common listener. Anyway, the current proposed solution works because the default behavior for mouse middle button is Open in New Tab. |
@lneir , I was looking to handle auxclick on our app but then I faced this: So, maybe we can go ahead with current solution on Paragon code to capture open on new tab requests that is the default action for mouse middle button click. |
the code that needs this fix is actually jquery and should work there. other issue i see is the onclick is not always getting called in DefaultEntitiesView rather it is being handle by some nexus renderer code (also jquery there). believe this is happening because some messages are messageML and others are legacy markdown format. |
so 'auxclick' in the two places should works. i checked with glenn and one is indeed for legacy markdown renderering and other is for markdown rendering. |
closing PR in favor of handing in core JS code. |
Implement OnOpenUrlFromTab to handle mouse middle button click.
Jira ticket: DES-16866