InlineEdit component does not use the properly namespaced component name for its defaults

Description

The InlineEdit component, being our very oldest component, has not used the proper namespace to hold its options. Its defaults are issued against "inlineEdit" and "inlineEdits" rather than "fluid.inlineEdit" and "fluid.inlineEdits". This will cause problems where users attempt to make use of our version management strategy to make multiple versions of Fluid coexist, as well as just being a reading hazard - I became convinced that fixes for FLUID-4725 contained a bug as a result of "reading over" the incorrect versions of the defaults statements.

In theory, only the component's implementation should read its defaults, and so correcting this issue need not represent a breaking API change. It may also lead to removal of bugs in other situations - currently if a use is made of InlineEdit in an IoC situation, the context name "fluid.inlineEdit" which every user will expect to be present will not be seen.

The following lines of code in the FLUID-4725 fix issue a read to the component's own defaults using the faulty name, which compounds the problem:

if ((that.options.defaultViewText !== undefined) &&
(that.options.strings.defaultViewText === fluid.defaults("inlineEdit").strings.defaultViewText)) {
that.options.strings.defaultViewText = that.options.defaultViewText;
}

Environment

None

Activity

Show:

Alexey Novak October 30, 2012 at 2:29 PM

Merged into master 8a9635b98a31b4b521e68115fcedf886582c72a3

Antranig Basman October 30, 2012 at 6:28 AM

Thanks for the fix and test case, Alexey

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created July 20, 2012 at 9:16 PM
Updated March 3, 2014 at 5:50 PM
Resolved October 30, 2012 at 6:28 AM