Why jquery .bind()
not working in opera for cut copy paste
events?
$(document).ready(function(){
$('#txtInput').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
Why jquery .bind()
not working in opera for cut copy paste
events?
$(document).ready(function(){
$('#txtInput').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
[Update] Opera implemented the Clipboard API in version 12.10 as far as I can tell, although it has been implemented in their Rendering Engine for quite some time (Presto/2.10.292).
This issue is not related to jQuery's bind
function but rather to the fact that Opera didn't support cut, copy and paste events before version 12.10.
what about alternative?
$('#txtArea').keydown( function(e){
if(e.which==17 || e.which == 91) isCtrl=true;
if(isCtrl) {
switch(e.which) {
case 67: dostuff(); break; //ctrl c
case 88: dostuff(); break; //Ctrl x
case 86: dostuff(); break; //ctrl
default: break;
}
e.preventDefault();
}
});