File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,15 @@ window.CodeMirror = (function() {
168168
169169 // Used for measuring wheel scrolling granularity
170170 d . wheelDX = d . wheelDY = d . wheelStartX = d . wheelStartY = null ;
171+
172+ //opera setDragImage hack
173+ if ( opera ) {
174+ var img = elt ( 'img' ) ;
175+ img . width = '1' ;
176+ img . height = '1' ;
177+ img . setAttribute ( 'style' , 'position:fixed; top:0; left:0; right:0' ) ;
178+ d . wrapper . appendChild ( img ) ;
179+ }
171180
172181 return d ;
173182 }
@@ -1612,8 +1621,9 @@ window.CodeMirror = (function() {
16121621
16131622 // Use dummy image instead of default browsers image.
16141623 // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
1624+ var img = opera ? cm . display . wrapper . getElementsByTagName ( 'img' ) [ 0 ] : elt ( 'img' ) ;
16151625 if ( e . dataTransfer . setDragImage && ! safari )
1616- e . dataTransfer . setDragImage ( elt ( ' img' ) , 0 , 0 ) ;
1626+ e . dataTransfer . setDragImage ( img , 0 , 0 ) ;
16171627 }
16181628
16191629 function setScrollTop ( cm , val ) {
You can’t perform that action at this time.
0 commit comments