rem: var nx = (hop_mouse_x( event ) - dx); var ny = (hop_mouse_y( event ) - dy); 
add: var nx = (hop_event_mouse_x( event ) - dx); var ny = (hop_event_mouse_y( event ) - dy); 
context: function hop_iwindow_drag( event, win ) {   var dx = hop_mouse_x( event ) - win.offsetLeft;   var dy = hop_mouse_y( event ) - win.offsetTop;   var ocursor = win.el_handle.style.cursor;   hop_iwindow_raise( win );   hop_style_set( win.el_main, "height", win.el_main.offsetHeight );   hop_style_set( win.el_main, "width", win.el_main.offsetWidth );   hop_style_set( win.el_body, "visibility", "hidden" );   hop_style_set( win.el_handle, "cursor", "move" );   var mousemove = function( event ) {      var nx = (hop_mouse_x( event ) - dx);      var ny = (hop_mouse_y( event ) - dy);      if( win.user_parent ) {	 var p = win.parentNode;	 var px = hop_element_x( p );	 var py = hop_element_y( p );      	 if( (nx > px) && ((nx + win.offsetWidth) < (px + p.offsetWidth)) ) {	    hop_style_set( win, "left", nx );	 }	 if( (ny > py) && ((ny + win.offsetHeight) < (py + p.offsetHeight)) ) {	    hop_style_set( win, "top", ny );	 }      } else {	 if( nx > 0 ) hop_style_set( win, "left", nx );	 if( ny > 0 ) hop_style_set( win, "top", ny );      }   }   var mouseup = function( event ) {      hop_remove_event_listener( document, "mousemove", mousemove );      hop_remove_event_listener( document, "mouseup", mouseup );      hop_style_set( win.el_handle, "cursor", ocursor );      hop_style_set( win.el_body, "visibility", "visible" );      /* user event */      if( win.ondrag ) win.ondrag();   }      hop_add_event_listener( document, "mousemove", mousemove );   hop_add_event_listener( document, "mouseup", mouseup );   hop_stop_propagation( event );}
meta: 4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/156180e2b1a546060c4a495a7b45070e1ebfacec/hop-iwindow.js/buggy/share/hop-iwindow.js