From: Richard B. <ric...@us...> - 2001-11-14 13:27:05
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv24725 Modified Files: dragevent.js Log Message: added Martin Strom's fix for forms in draggable layers Index: dragevent.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/dragevent.js,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** dragevent.js 2001/11/08 14:35:01 1.12 --- dragevent.js 2001/11/14 13:27:02 1.13 *************** *** 24,27 **** --- 24,33 ---- DragEvent.lyrListener.onmousedown=function(e) { + //fix to allow forms in draggable layers to select text. + if (is.def) { + var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; + if (tn=="INPUT" || tn=="TEXTAREA") return; + } + e.cancelBrowserEvent(); if (DragEvent.dragevent.src) return; *************** *** 118,121 **** --- 124,136 ---- } if (is.ie) lyr.doc.body.onselectstart = null; + + //refresh screen to display form objects in draggable layers + if(lyr.doc.forms.length>0){ + if (is.ie && is.platform=="mac") { + document.body.className = document.body.className; + }else if (is.ns4 && is.platform=="win32") { + document.bgColor = document.bgColor; + } + } // Avoid click for the dragged layer ( with MouseEvent addition ) |