Skip to content

Commit

Permalink
[#605 state:resolved] IE7 sends click events to cloned buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Jan 16, 2010
1 parent 8b2481b commit 82e388b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hobo/rails_generators/hobo_rapid/templates/hobo-rapid.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ new HoboBehavior("ul.input-many", {
Event.stop(ev);
var ul = el.up('ul.input-many'), li = el.up('li.input-many-li');

if(li.id.search(/\[-1\]/)>=0) {
/* if(console) console.log("IE7 messed up again (bug 605)"); */
return;
}

var template = ul.down("li.input-many-template");
var clone = $(template.cloneNode(true));
clone.removeClassName("input-many-template");
Expand Down Expand Up @@ -686,6 +691,11 @@ new HoboBehavior("ul.input-many", {
var ul = el.up('ul.input-many'), li = el.up('li.input-many-li')
var minimum = parseInt(Hobo.getClassData(ul, 'minimum'));

if(li.id.search(/\[-1\]/)>=0) {
/* if(console) console.log("IE7 messed up again (bug 605)"); */
return;
}

if(ul.fire("rapid:remove", { element: li }).stopped) return;

// rename everybody from me onwards
Expand Down

0 comments on commit 82e388b

Please sign in to comment.