makeDraggable Not working in chrome.

114 views
Skip to first unread message

Paul Saukas

unread,
Aug 27, 2012, 10:09:24 AM8/27/12
to mootool...@googlegroups.com
I am working on a window/dialog class. One for a project and two to learn something new. I have it working for the most part in IE and Firefox, but in chrome the window will not be made drag-able. It's not throwing any errors that I can see. I have a fiddle set up here [http://jsfiddle.net/Arasoi/Np85k/2/] for you to poke at. Any insight would be welcome, and thanks in advance :D .

Philip Thompson

unread,
Aug 27, 2012, 10:22:45 AM8/27/12
to mootool...@googlegroups.com
There is a lot going on in that class. If you could narrow it down where we specifically need to look, that would be beneficial. Also, having a class named "Window" _could_ get hairy because of the reserved word "window". You may want be a little bit more specific: var PSWindow = new Class(...), or something like that. 

With that said, chrome does not appear to have an issue with makeDraggable....  http://jsfiddle.net/CYgdx/ You may strip a bunch of the code out and slowly bring pieces back so you can see what's breaking the drag functionality.

Happy coding,
~Philip

Paul Saukas

unread,
Aug 27, 2012, 10:32:01 AM8/27/12
to mootool...@googlegroups.com
Thanks Philip,

 Looks like a bit more digging on my part is in order.  

--Paul

g.schlmm

unread,
Aug 27, 2012, 10:34:33 AM8/27/12
to mootool...@googlegroups.com
its seems chrome doesnt have a position of the element. in Drag.Move.js
there is a comparison of the position style to "static"
if you inject the element before making it draggable it works.
see http://jsfiddle.net/uRy98/

g.schlmm

unread,
Aug 27, 2012, 10:37:17 AM8/27/12
to mootool...@googlegroups.com
oups. now with css: http://jsfiddle.net/uRy98/1/

Paul Saukas

unread,
Aug 27, 2012, 10:46:43 AM8/27/12
to mootool...@googlegroups.com, g.sc...@googlemail.com
Ah, yes swapping that made all the difference in the world. :)  http://jsfiddle.net/Arasoi/Np85k/3/  Thanks for the insight I will file that off in the handy tips section of the brain. 


--Paul 

Angel

unread,
Sep 21, 2012, 11:43:58 PM9/21/12
to mootool...@googlegroups.com, mootool...@googlegroups.com


Sent from my iPhone

Sitthykun LY

unread,
Sep 22, 2012, 12:05:39 AM9/22/12
to mootool...@googlegroups.com
Great job!
--
Sitthykun LY
a little developer in the big world \o/
mobile: +85595 7788 39
skype: cityx9
twitter: sitthykun <http://twitter.com/sitthykun>
site: niyum.com


Reply all
Reply to author
Forward
0 new messages