Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

UJS and nested constructions

#390

The story goes like that, when you have an elements kinda like that

<div class="one">
  one text
  <div class="two">
    second text
    <div class="three">
      third text
    </div>
  </div>
</div>

And when we hook up the first div with UJS

"div.one".onClick(function() {
  console.log(this.getClass());
});

It works only if you click on the div.one itself and doesn't if you click on inner elements. Which is kinda annoying and a bit unexpected, because when you hook events directly to an element, all the inner element clicks bubble and got caught at the basic element level.

So we need kinda investigate what what. I think that would be a good idea if UJS in RightJS will work with nested elements the same way as it does with normal elements, be we need to check if we won't screw people over with such a change and plus we need to check how fast it is, because in current implementation we match the target element only, but if we go with nested ones as well, then we will have to check all the parent elements as well which might get pretty slow.

Reported by MadRabbit · October 22nd, 2010 @ 04:07 PM

State: resolved
Milestone: 2.2.0 Release
Assigned to: nobody

Activity

  1. MadRabbit
    MadRabbit
    • State changed from new to resolved

    January 8th, 2011 @ 07:47 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.