Skip to main content

Bug Tracker

Side navigation

#13527 closed bug (notabug)

Opened February 27, 2013 04:31PM UTC

Closed February 27, 2013 04:33PM UTC

mouse middle Click

Reported by: i@vickai.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery下建立鼠标中键事件,然后调用:

(function($) {

$.fn.extend({

"rightClick":function(fn){

$(document).bind('contextmenu',function(e){

return false;

});

$(this).mousedown(function(e){

if(3 == e.which){

fn();

}

});

},

"middleClick":function(fn){

$(this).mousedown(function(e){

e = window.event || e;

var w = e.which || e.button;

if(2 == w){

fn();

}

});

}

});

})(jQuery);

$("body").middleClick(function(){

return false;

});

页面依然会滚动,其他浏览器没有这个问题。这个是浏览器的bug还是jQuery得bug?

Attachments (0)
Change History (1)

Changed February 27, 2013 04:33PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

Please ask for help on a forum.