I have just reported this as a potential bug at the Lighthouse website.
2008/10/10 Lea Hayes <[EMAIL PROTECTED]>:
> Hi again,
>
> Unless I am missing something, it would appear that stopObserving does
> not work at all in Google Chrome!
>
> 2008/10/5 Lea Hayes <[EMAIL PROTECTED]>:
>> Yes, that s
Hi again,
Unless I am missing something, it would appear that stopObserving does
not work at all in Google Chrome!
2008/10/5 Lea Hayes <[EMAIL PROTECTED]>:
> Yes, that solves the problem, it now works in IE7/8+FF3.
>
> Sadly in Chrome it doesn't appear to work at all. Clicking the stop
> button
This works great, until a form or input element, is within the element
hierarchy. It is mainly a problem with the HTML input tag, because
most of the time (especially in ASP.NET) everything is contained
within the form.
Test Page
Object.extend(Element.
Yes, that solves the problem, it now works in IE7/8+FF3.
Sadly in Chrome it doesn't appear to work at all. Clicking the stop
button does absolutely nothing, yet the method is being called because
I tried sticking a test message box in there. The box appears, but the
events are simply not stopped.
Woops!
isVisible: function(element) {
var ok = $(element).visible();
if (!ok) {
return false;
}
$(element).ancestors().each(
function(obj){
ok = obj.visible();
if (!ok) throw $break;
}
Still not like what it does to the Event.cache. If you plan an app
that should work 8 hours a day, without browser refresh - hey, we are
moving on to the browser or what ;) - I think that every bit should be
considered, and in an interface with 3 or 4 active windows at time,
each one with dozens o
On Oct 3, 7:26 pm, "Lea Hayes" <[EMAIL PROTECTED]> wrote:
> This works great, until a form or input element, is within the element
> hierarchy. It is mainly a problem with the HTML input tag, because
> most of the time (especially in ASP.NET) everything is contained
> within the form.
>
>
>
>
On Oct 3, 7:31 am, "Lea Hayes" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Ah right, that's fair enough. When I wrote that post I didn't realize
> that you could simply pass a function reference into the each method.
>
> Personally I prefer to take advantage of the slightly higher level
> interfaces prov
Hi,
Ah right, that's fair enough. When I wrote that post I didn't realize
that you could simply pass a function reference into the each method.
Personally I prefer to take advantage of the slightly higher level
interfaces provided by Prototype to avoid possible difficulties in
future releases.
On Oct 2, 6:15 pm, "Lea Hayes" <[EMAIL PROTECTED]> wrote:
> Or as puckpuck suggested with the 'descendants' method instead of the
> CSS selector for greatly improved performance.
`Element.descendants` uses `Element.select` internally. That's why I
used `select` directly (to avoid an extra functio
I just realised, it might be better to do the following instead:
Object.extend(Element.Methods, {
stopObservingNested: function(element) {
element.stopObserving();
element.descendants().each(Element.stop
Or as puckpuck suggested with the 'descendants' method instead of the
CSS selector for greatly improved performance.
Object.extend(Element.prototype, {
stopObservingNested: function() {
this.stopObserving();
On Oct 2, 9:57 am, labs <[EMAIL PROTECTED]> wrote:
> Yeah, but if you firebug the Event object after recursive unregister, you
> will see that every element that doesnt had a _prototypeEventID will create
> an entry in Event.cache. This is because the way the eventId is generated
> and THERE I'll
Yeah, but if you firebug the Event object after recursive unregister, you
will see that every element that doesnt had a _prototypeEventID will create
an entry in Event.cache. This is because the way the eventId is generated
and THERE I'll not mess with :)
Those entry are empty, I know, but ohhh..
When I made that post, I was very groggy, and realized I used a CSS
selector *, which well... is horrid slow, especially on IE. using
elem.descendants() instead would of made far more sense.
Also I would stay away from checking on the existing of
_prototypeEventID on the element. This is an int
Hi puckpuck!,
That's a really handy little snippet, so much simpler than manually
enumerating nested HTML elements and stopping them individually (which
I have previously done).
If this functionality were to be bundled within the Prototype
framework I personally think it would be better to offer
Yeah. I know. I did that:
Element.addMethods({
clearEvents: function(element) {
element.descendants().each(
function(obj){
if (obj._prototypeEventID) {
obj.stopObserving();
}
}
);
element.stopOb
This exact question was asked today at TAE.
At this time, no. stopObserving will not go through the children of
the container and remove events. In the future it is certainly
possible. Mind you it wouldn't be very difficult to write your own
method to recurse through all the children of a give
Hi. Please, would you be kind to clearify this to me: if I call
"Event.stopObserving(myWindow)", beeing 'myWindow' a div (ajax
generated window wich can came and go as the user will), who doesnt
have observers, but its a container (and parent) for many other
elements (components) that may does, m
Hi guys!
Thanks everyone for clarifying this for me!
On Sep 10, 1:45 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi again folks,
>
> It was already there, ticket #158 from June
> 10th:http://prototype.lighthouseapp.com/projects/8886/tickets/158
>
> More on the new event stuff in
> 1.6.0:h
Hi again folks,
It was already there, ticket #158 from June 10th:
http://prototype.lighthouseapp.com/projects/8886/tickets/158
More on the new event stuff in 1.6.0:
http://prototypejs.org/2007/8/15/prototype-1-6-0-release-candidate
HTH,
--
T.J. Crowder
tj / crowder software / com
On Sep 10, 1:
Hi folks,
> try a look at the API
> documentation:http://www.prototypejs.org/api/event/stopObserving
> (you exactly do what is wrong !!)
Actually, David, what she's doing is just fine. She's using a
new(ish) feature of stopObserving which appears to be missing from the
docs. If you don't incl
Hi Lea,
try a look at the API documentation:
http://www.prototypejs.org/api/event/stopObserving
(you exactly do what is wrong !!)
Because you should do:
myTestClass.myCallback=this.clickHandler.bindAsEventListener(this);
myTestClass.prototype.initEvents = function()
{
var myDiv1 = $('examp
23 matches
Mail list logo