| Page 1 of 1 | [ 6 posts ] |
Josh LizarragaYUI Contributor
|
Hi all,
I must be doing something wrong, because this extremely basic example works in in Firefox 3.0, Safari 3, Chrome 2, and Opera 9.6, but not in IE6 or IE7: Code: <div id="demo"> <input type="text" /> </div> <script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script> <script type="text/javascript"> YUI().use('event', function(Y){ Y.on('blur', function(){alert('blur')}, '#demo'); }); </script> Any help is greatly appreciated! |
|
The beta release went out with a broken focus/blur implementation for IE. It has been fixed for some time on github. To make it work with the beta release, you would need to check Y.UA to identify the browser and use 'focusout' instead of 'blur' if IE was detected.
|
Josh LizarragaYUI Contributor
|
Doh! Every time I think the library is at fault, it's my code, and every time I think it's my code, it's the library!
Thanks a bunch for clearing that up, Adam! |
Josh LizarragaYUI Contributor
|
Hm, seems that using "focusin" and "focusout" doesn't work for IE with the beta release either:
<input id="demo" type="text" /> <script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script> <script type="text/javascript"> YUI().use('event', function(Y){ Y.on('focusout', function(){alert('blur')}, '#demo'); }); </script> I have never used github before - what exactly should I be downloading? Thanks! |
|
Once git is installed: git clone git://github.com/yui/yui3.git
Github has a number of resources to get you familiarized with their system. The events are probably not working because they are not white listed. You can try adding them by specifying the following before binding the listeners: Y.Node.DOM_EVENTS.focusin = true; Y.Node.DOM_EVENTS.focusout = true; |
Josh LizarragaYUI Contributor
|
White listing the events works *perfectly*.
Thanks again for all your help Adam! |
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group