Metadata
- Source
- FLUID-844
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Colin Clark
- Reporter
- Colin Clark
- Created
2008-07-01T13:47:40.000-0400 - Updated
2011-02-22T16:27:43.153-0500 - Versions
-
- 0.1
- 0.3
- 0.4beta1
- 0.4
- Fixed Versions
-
- 0.6
- Component
-
- Inline Edit
Description
At the moment, InlineEdit requires the edit field to be wrapped in a container element. This is sensible for cases where you've got a composite edit mode: for example, a text field with save and cancel buttons.
However, for simple cases where you only need a single edit field, there's no reason to require a container element.
Here's a workaround for this:
Change to InlineEdit.bindToDom():
var isEditSameAsContainer = instance.editContainer.is(instance.selectors.edit);
var containerConstraint = isEditSameAsContainer ? instance.container : instance.editContainer;
instance.editField = $(instance.selectors.edit, containerConstraint);
The user would have to override the default selectors for edit and editContainer and set them to the same value.
We should probably come up with a more general approach to handling this. Maybe in the DOM Binder?
Comments
-
Antranig Basman commented
2008-11-13T21:27:53.000-0500 Fixed at revision 6031 with branch merge.
The "isSameAsContainer" logic has been tweaked a bit. I don't think this use case is general enough to warrant hacking the DOM binder. At least, not until we have another example of it 🙂 -
Michelle D'Souza commented
2011-02-22T16:27:43.126-0500 Closing issues that were resolved for 1.0 and earlier releases.