PDA

View Full Version : [FIXED][3.0] Ext.Select change in behaviour?



robw
16 Apr 2009, 7:42 AM
Hi

I have been using the following code for ages. Until recently it has worked but now is broken (i am using latest code from SVN).


Ext.select('p', true, 'container').addClassOnOver('hi');Should add the class to all the <p> tags. but now hovering over any of the <p> tags adds the class to the last <p>.

Any ideas what's going on?!

Thanks
Rob


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script type="text/javascript" src="/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/ext/ext-all-debug.js"></script>
<style type="text/css">.hi { background-color: red; }</style>
</head>
<body>

<div id="container">
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
</div>

<script type="text/javascript">
Ext.onReady(function() {
Ext.select('p', true, 'container').addClassOnOver('hi');
});
</script>
</body>
</html>

jsakalos
16 Apr 2009, 5:45 PM
For me, (svn 3726) only 4th paragraph highlights on over. Do you want me to move this thread to bugs?

robw
17 Apr 2009, 1:07 AM
Definitely, thanks.

Condor
17 Apr 2009, 2:12 AM
Ext.select() is defined in core\core\CompositeElementLite.js, but it should be redefined in core\CompositeElement.js.

Simply adding:

Ext.select = Ext.Element.select;
should fix things.

robw
17 Apr 2009, 2:37 AM
Great, that fixes it thanks.

I'm confused about what should be included in the build though.

There is no file "core\core\CompositeElement.js"

src/ext.jsb includes these for ext-all:

<include name="core\core\CompositeElementLite.js" />
<include name="core\CompositeElementLite-more.js" />
<include name="core\CompositeElement.js" />

What should it be?


Thanks
Rob

Condor
17 Apr 2009, 3:20 AM
My info wasn't 100% correct. I've updated my previous post with the correct info.

robw
17 Apr 2009, 4:05 AM
ok, will it also be fixed in the trunk?

Thanks for your help
Rob

evant
17 Apr 2009, 2:11 PM
Added to the trunk, thanks.

robw
18 Apr 2009, 5:09 AM
briliant, thanks both for the quick action