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: |
Description
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 1.6.0.3.
Attachments (1)
Change History (7)
Changed 14 years ago by
Attachment: | test_Gallery_proto.html added |
---|
comment:1 Changed 14 years ago by
Component: | General → Dojox |
---|---|
Owner: | changed from anonymous to dante |
comment:2 Changed 14 years ago by
Cc: | sos added |
---|---|
Milestone: | tbd → future |
comment:3 Changed 14 years ago by
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
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
Owner: | changed from dante to Shane O'Sullivan |
---|
comment:6 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This package is abandoned.
there is some magic going on in smoothScroll window detection, I would be willing to bet that's it. Is 1.6.0.3 the newest? will need to download and test.