yui / yui3

A library for building richly interactive web applications.
http://yuilibrary.com/
Other
4.12k stars 1.29k forks source link

Scrollview not working on IE when loaded from local #1348

Closed Trapulo closed 10 years ago

Trapulo commented 10 years ago

If I download files (using configurator) to run Scrollview (with all plugins) and load them from my server (I need SSL), IE doens't work. It reports in "object doesn't support property or method '_fixIESelect'" running e._fixIESelect(e._bb,e._cb)

The scrollview-base-ie module is loaded. I see that the configurator loads it as last module. I've tried to move before where I have the runtime error but still the same.

Mi mistake or a bug?

thanks

ezequiel commented 10 years ago

@Trapulo,

I need more information before I can debug this issue.

Trapulo commented 10 years ago

I've tried but it reports that "ReferenceError: YUI is not defined". However files are referenced... :( you can check at http://jsfiddle.net/DdKdT/

I've tried IE 11, IE 10, IE 9, IE 8. Same. On FFox and Chrome it works

Files from configurator are

CSS link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.13.0/widget-base/assets/skins/sam/widget-base.css&3.13.0/scrollview-base/assets/skins/sam/scrollview-base.css&3.13.0/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css">

script type="text/javascript" src="http://yui.yahooapis.com/combo?3.13.0/node-base/node-base-min.js&3.13.0/event-base/event-base-min.js&3.13.0/event-synthetic/event-synthetic-min.js&3.13.0/event-focus/event-focus-min.js&3.13.0/node-style/node-style-min.js&3.13.0/widget-base/widget-base-min.js&3.13.0/widget-htmlparser/widget-htmlparser-min.js&3.13.0/widget-skin/widget-skin-min.js&3.13.0/event-delegate/event-delegate-min.js&3.13.0/node-event-delegate/node-event-delegate-min.js&3.13.0/widget-uievents/widget-uievents-min.js&3.13.0/event-touch/event-touch-min.js&3.13.0/event-flick/event-flick-min.js&3.13.0/event-move/event-move-min.js&3.13.0/event-mousewheel/event-mousewheel-min.js&3.13.0/transition/transition-min.js&3.13.0/scrollview-base/scrollview-base-min.js&3.13.0/plugin/plugin-min.js&3.13.0/scrollview-scrollbars/scrollview-scrollbars-min.js&3.13.0/scrollview/scrollview-min.js&3.13.0/scrollview-base-ie/scrollview-base-ie-min.js"

ezequiel commented 10 years ago

@Trapulo,

Thanks for the reproduction.

Yes, you are using the configurator correctly. Here's what I figured out so far:

As to the last point, this definitely is a bug. Unfortunately, if you load YUI statically, scrollview-base-ie will not work out of the box. You must add it to use, like so:

YUI().use('scrollview', 'scrollview-base-ie', function (Y) { ... });

Example: http://jsfiddle.net/DdKdT/22/


Until this bug is fixed, I encourage you to load your modules dynamically.

Example (note how I only loaded the YUI seed file): http://jsfiddle.net/DdKdT/23/

Trapulo commented 10 years ago

Thank you! I'd like to use dynamic load, but my site is under SSL and it doesn't work because I will have mixed page sources. Is there any way I can load library dynamically from SSL?

ezequiel commented 10 years ago

@Trapulo,

Unfortunately, no, we do not currently have the ability to serve YUI over SSL. If you wish to load YUI over SSL, you must host YUI on your server, and load it from there.

Trapulo commented 10 years ago

Can you confirm that your workaround will work on IE8? It seems I've some trouble on it..

"unable to get property "getComputedStyle" of undefined or null reference"

thanks

ezequiel commented 10 years ago

@Trapulo,

You're right. It seems Loader is more broken than I thought with the configurator. Specifying scrollview-base-ie in the use function only temporarily solved the problem on IE 10. However, there's still major problems on IE 8, and most likely 6 & 7. It's not loading other key IE modules required for ScrollView to work.

As of now, I suggest you host YUI on your own server, and load it from there (the build directory). Here's the download link: http://yui.zenfs.com/releases/yui3/yui_3.13.0.zip

Trapulo commented 10 years ago

browsers will download about 40 files this way? Did I understand right as it works?

ezequiel commented 10 years ago

@Trapulo,

I have a new solution. Try using the configurator again (visiting the website in IE), but instead use YUI in the following way:

YUI().use("*", function (Y) {

});

(note the *).

ezequiel commented 10 years ago

Note x2: Only use the * when using the configurator.

Trapulo commented 10 years ago

"Unable to get property 'getComputedStyle' of undefined or null reference"

However I'm not sure: I've used the files I've previously downloaded. With "visiting the website in IE)," do you mean that I may download them again from scratch?

ezequiel commented 10 years ago

@Trapulo,

Did you eventually solve your problem?

Trapulo commented 10 years ago

no :( I've removed Yui from my app :(