Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[webdoc] Try to catch modifiers on click to let them bubble

  • Loading branch information...
commit ef6e699b62c5ddca1e98e164754acf342037939d 1 parent 658d592
@garuma garuma authored
Showing with 15 additions and 3 deletions.
  1. +11 −1 webdoc/monodoc.ashx
  2. +4 −2 webdoc/ptree/tree.js
View
12 webdoc/monodoc.ashx
@@ -314,6 +314,16 @@ namespace Mono.Website.Handlers
ctx.Response.Write (tree_path);
ctx.Response.Write (@"' />
<script type='text/javascript'>
+
+function try_change_page (link, e)
+{
+ if (!e)
+ e = window.event;
+ if (e.ctrlKey || e.shiftKey || e.altKey || e.metaKey || e.modifiers > 0)
+ return;
+ window.parent.change_page (link)
+}
+
function login (rurl)
{
document.location.href = 'login.aspx?ReturnUrl=' + rurl;
@@ -441,7 +451,7 @@ s.parentNode.insertBefore(ga, s);
theMatch.Groups[4].ToString());
} else {
- updated_link = String.Format ("{0}{1}?link={2}{3} onclick=\"window.parent.change_page('{2}')\" {4}",
+ updated_link = String.Format ("{0}{1}?link={2}{3} onclick=\"try_change_page('{2}')\" {4}",
theMatch.Groups[1].ToString(),
requestPath,
HttpUtility.UrlEncode (link.Replace ("file://","")),
View
6 webdoc/ptree/tree.js
@@ -108,10 +108,12 @@ function PTree ()
eltDescription.appendChild (eltText);
var parent = this;
eltDescription.onclick = function (e) {
+ if (!e)
+ e = window.event;
+ if (e.ctrlKey || e.shiftKey || e.altKey || e.metaKey || e.modifiers > 0)
+ return;
_this.SelectNode (eltDiv);
if (parent.onClickCallback) {
- if (!e)
- e = window.event;
e.cancelBubble = true;
e.returnValue = false;
if (e.stopPropagation) {
Please sign in to comment.
Something went wrong with that request. Please try again.