Latest edge updates b0rked <input many />
Reported by Gert Thiel | January 21st, 2010 @ 05:49 PM | in Hobo 1.0 - Final
Between commit c1c967867c565b0b1bc532015156dc5525897903 and aacb550f02d6e1a7d1a8537cce7627a253511b28 something regarding had changed in a (bad) way.
I can not add a first new subrecord by pressing the "+" button. If the record already has at least one subrecord everything works.
The generated HTML source generated for the related "+" button looks suspicious:
<li class="input-many-li empty " id="project[project_setups][-1]_empty">
<!-- HACK way to signal an empty collection to the controller -->
<input class="empty-input" id="project[project_setups]" name="project[project_setups]" type="hidden" value="" />
<div class="empty-message">
No registered relations
</div>
<div class="buttons">
<button class="hidden remove-item" id="project_project_setups_-1_remove">-</button>
<button class="add-item" id="project_project_setups_-1_add">+</button>
</div>
</li>
Did you recognize the -1
in
id="project_project_setups_-1_add"
?
Comments and changes to this ticket
-
Bryan Larsen January 22nd, 2010 @ 01:22 PM
- Tag changed from defect to input-many rapid, defect
- Assigned user set to Bryan Larsen
- Milestone set to Hobo 1.0 - Final
OK, that's annoying. You have to have a very specific set of circumstances to not trigger the bug when testing an empty collection. But I managed to do so.
-
Bryan Larsen January 22nd, 2010 @ 02:27 PM
- State changed from new to resolved
(from [edfae232059e3f6f4e22974eba1c7d823f075d33]) [#608 state:resolved] difficulty adding elements to empty input-many http://github.com/tablatom/hobo/commit/edfae232059e3f6f4e22974eba1c...
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
- 608 Latest edge updates b0rked <input many /> (from [edfae232059e3f6f4e22974eba1c7d823f075d33]) [#608 s...
- 796 input-many add button behaves strange in IE Somehow our fix for #608 broke the fix for #605