开发者

Can I add a bind paste event on mousedown in jQuery?

开发者 https://www.devze.com 2023-01-29 01:01 出处:网络
I want to catch开发者_JS百科 the paste event with right Click and Paste selection on a textarea. What I did is:

I want to catch开发者_JS百科 the paste event with right Click and Paste selection on a textarea. What I did is:

$(window).bind('paste', function(event) {                  
    pasteText();  
    return false;              
 });

and it works ok. So when the Paste is clicked a small popup window is shown. What I want is to make this popup window shown on mousedown event. I mean when I click the Paste (mousedown) then I want to see the popup. Is this possible to happen?

Thanks in advance


You can't catch the mousedown event on the context menu (as one could prevent save as, view source, etc functions)...so the browsers really don't fire an event there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号