fredsa / gwt-dnd

Library providing easy to use mouse or touch based drag-and-drop capabilities to GWT
42 stars 41 forks source link

'getBoxObjectFor not found' error for Chrome 4.0. #110

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
getBoxObjectFor is deprecated.

What version of GWT are you using?  2.0

What version of the gwt-dnd jar library?  3.0

What operating system(s) are you using? Ubuntu 9.1

Issue occurs in:    Web mode, only

What browser(s) do you use? 
    Fails in Chrome 4.0.
    Works in Firefox 3.5.

What steps will reproduce the problem?
    Run Complicated-example #2.  (Your second drag-n-drop project)

What is the expected output? 
    Labels dragged with aplomb.

What do you see instead?
    Stack trace in "UncaughtException" dialog box.   (See below.)

Do you have a workaround or bug fix to be implemented?

Replace the implementations of the getAbsoluteLeft and getAbsoluteTop 
methods with: 
        return elem.getBoundingClientRect().left - 
$doc.documentElement.getBoundingClientRect().left; 
                and 
        return elem.getBoundingClientRect().top - 
$doc.documentElement.getBoundingClientRect().top; 

See. http://groups.google.com/group/google-web-
toolkit/browse_thread/thread/88a8437754345092/124a29de8bad4688?
lnk=raot&pli=1

Please provide any additional information below.

Uncaught exception: com.google.gwt.core.client.JavaScriptException: 
(TypeError): Object [object HTMLDocument] 
    has no method 'getBoxObjectFor'  stack: TypeError: Object [object 
HTMLDocument] has no method 'getBoxObjectFor'     
        at $getAbsoluteLeftImpl       
        at $getRelativeX 
        at $getX 
        at $continueDragging 
        at Object.onMouseMove_0 [as onMouseMove]      
        at Object.dispatch_18 [as dispatch] 
        at $fireEvent_1 
        at $fireEvent_0 
        at $fireEvent 
        at fireNativeEvent 

  type: undefined_method  arguments: getBoxObjectFor,[object HTMLDocument]          
        at Unknown.anonymous(Unknown source:0)          
        at Unknown.at $getAbsoluteLeftImpl(Unknown source:0)          
        at Unknown.at $getRelativeX(Unknown source:0)          
        at Unknown.at $getX(Unknown source:0)          
        at Unknown.at $continueDragging(Unknown source:0)          
        at Unknown.at Object.onMouseMove_0 [as onMouseMove](Unknown 
source:0)          
        at Unknown.at Object.dispatch_18 [as dispatch](Unknown source:0)          
        at Unknown.at $fireEvent_1(Unknown source:0)          
        at Unknown.at $fireEvent_0(Unknown source:0)          
        at Unknown.at $fireEvent(Unknown source:0)     
        at Unknown.at fireNativeEvent(Unknown source:0) 

Original issue reported on code.google.com by mitchi...@gmail.com on 26 Mar 2010 at 6:19

GoogleCodeExporter commented 9 years ago
Does the demo work for you?
http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.ht
ml

It works for me in Firefox 3.6 and Chrome 5

Original comment by fredsa@google.com on 26 Mar 2010 at 9:50

GoogleCodeExporter commented 9 years ago

Original comment by fredsa@google.com on 26 Mar 2010 at 9:50

GoogleCodeExporter commented 9 years ago
This is one for the internet archives

Original comment by fredsa on 31 Jan 2012 at 6:17