Opened 14 years ago

Closed 9 years ago

#7996 closed defect (wontfix)

Gallery breaks if prototype.js is present

Reported by: tomagnew Owned by: Shane O'Sullivan
Priority: high Milestone: future
Component: Dojox Version: 1.2.0
Keywords: prototype.js Cc: sos
Blocked By: Blocking:


ThumbnailPicker? no longer scrolls if prototype.js is loaded. See attached test page (test_Gallery.html with prototype.js added).

Stepping through in firebug, smoothScroll seems to be called as usual. Could the problem be in fx?

I am running with Dojo 1.2 and Prototype

Attachments (1)

test_Gallery_proto.html (2.5 KB) - added by tomagnew 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by tomagnew

Attachment: test_Gallery_proto.html added

comment:1 Changed 14 years ago by Adam Peller

Component: GeneralDojox
Owner: changed from anonymous to dante

comment:2 Changed 14 years ago by dante

Cc: sos added
Milestone: tbdfuture

there is some magic going on in smoothScroll window detection, I would be willing to bet that's it. Is the newest? will need to download and test.

comment:3 Changed 14 years ago by tomagnew

You would win the bet! As you suggested, I traced the window detection logic inside fx/scroll.js, and indeed the problem is there.

Here is the offending code, at line 16:

var isWindow = dojo[(dojo.isIE ? "isObject" : "isFunction")](args["win"].scrollTo);

It appears to be detecting the presence of the "scrollTo" method to determine if the widget is a window. Unfortunately, prototype.js defines a scrollTo method under Element. When prototype is present, this method appears to exist, and smoothScroll thinks that arg is a window.

Is there a safer/more explicit test to determine if the arg is a window?

Also, I also found scrollTo methods defined in grid/_Grid.js and grid/_View.js. I suspect these have similar bugs.

What is the best way to fix this?

comment:4 Changed 13 years ago by dante

heh. The best way to fix this is to not use Prototype ;) (this is why we don't extend native prototypes / builtins, wreaks all sorts of interoability havoc)

not sure how we can fix this, even feature detection would be fooled.

comment:5 Changed 12 years ago by dante

Owner: changed from dante to Shane O'Sullivan

comment:6 Changed 9 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

This package is abandoned.

Note: See TracTickets for help on using tickets.