dont paste on middle click of link

pull/2467/head
John McLear 2015-01-18 23:58:47 +00:00
parent 6bc74a9adb
commit 0bd7914c3b
1 changed files with 8 additions and 0 deletions

View File

@ -4858,6 +4858,14 @@ function Ace2Inner(){
$(document).on("click", handleIEOuterClick); $(document).on("click", handleIEOuterClick);
} }
if (browser.msie) $(root).on("paste", handleIEPaste); if (browser.msie) $(root).on("paste", handleIEPaste);
// Don't paste on middle click of links
$(root).on("paste", function(e){
if(e.target.a){
e.preventDefault();
}
})
// CompositionEvent is not implemented below IE version 8 // CompositionEvent is not implemented below IE version 8
if ( !(browser.msie && browser.version < 9) && document.documentElement) if ( !(browser.msie && browser.version < 9) && document.documentElement)
{ {