Opened 10 years ago
Closed 10 years ago
#13527 closed bug (notabug)
mouse middle Click
Reported by: | 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?
Note: See
TracTickets for help on using
tickets.
Please ask for help on a forum.