Metadata
- Source
- FLUID-4428
- Type
- Bug
- Priority
- Blocker
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Anastasia Cheetham
- Created
2011-09-06T14:22:27.911-0400 - Updated
2011-09-07T13:23:14.618-0400 - Versions
- N/A
- Fixed Versions
-
- 1.4
- Component
-
- UI Options
Description
I am unable to add an 'onSave' listener to uiOptions using the munged options as follows:
fluid.uiOptions.fullNoPreview("#test", {
prefix: "yada/yada",
uiOptions: {
options: {
listeners: {
onSave: function () {
console.log("onSave event fired");
}
}
}
}
});
The event fires, but it appears that the listener was never registered.
This functionality worked before the FLUID-4409 branch was merged. I tested the project repo immediately before the merge and it worked, and after the merge it didn't.
Bug Parade Infusion
Comments
-
Anastasia Cheetham commented
2011-09-06T15:23:51.206-0400 The change in the merged branch that seems to have precipitated this bug is in UIOptions.js fluid.uiOptions.mapOptions(): The code that processes the user-passed-in options is now wrapped in a test: if (typeof(source) === "string").
The 'source' in this case is the right-hand-side of a config key/value pair. I'm not 100% sure how the options munging works, but from what I can see, requiring the right-hand-side to be a string is reasonable. If this is true, then the problem lies in the fact that the two full-page version of UI Options do not do this in their config: they have full JS objects.
-
Michelle D'Souza commented
2011-09-07T12:13:33.861-0400 Pull request https://github.com/fluid-project/infusion/pull/155 merged into project repo at c998d2b4492aaa6932ad3e0f70f7a64a86729260
-
Michelle D'Souza commented
2011-09-07T13:23:14.613-0400 A second pull request which allows direct options was merged into the project repo at a29adc3ebd03ea650d67e3e9981f106474713191