FLUID-6507: Pressing "Enter" breaks UIO when there's only one text input field presented in UIO

Metadata

Source
FLUID-6507
Type
Bug
Priority
Major
Status
Open
Resolution
N/A
Assignee
N/A
Reporter
Cindy Li
Created
2020-05-28T20:29:31.576-0400
Updated
2020-06-03T09:35:47.431-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Prefs Framework
  2. UI Options

Description

These steps use the new refactored UIO branch as the example:

1. Open demos/prefsFramework/index.html in an editor;
2. In the code where fluid.uiOptions is instantiated, comment out line 105, 110, 111 to remove these panels: line spacing, letter spacing, word spacing. This leaves only one text input field from "text size" panel in UIO;
3. Start the demo at "demos/prefsFramework" in a browser;
4. Open UIO;
5. click into "text size" input box;
6. doesn't matter to change or not change the value;
7. hit "enter" key.

All panels in UIO disappear and leave a grey blank page.

Then,

1. Click "hide preferences", UIO closes;
2. Click "show preferences", UIO doesn't open and is broken. In firefox or safari, this error is thrown in the dev tool console:

Ignoring call to invoker updateModel of component  
Object { typeName: "fluid.uiEnhancer", id: "1xjwwss1-439", lifecycleStatus: "destroyed", destroy: fabricateDestroyMethod()
, options: {…}, events: {…}, fluid_prefs_enactor_tableOfContents: {…}, fluid_prefs_enactor_enhanceInputs: {…}, fluid_prefs_enactor_contrast: {…}, fluid_prefs_enactor_textFont: {…}, … }
  which has been destroyed

Expected behavior: The changed line space value applies to the website and UIO stays intact.

After some investigation, it appears that the problem is that an Implicit Submission is occurring. In this case, it is happening because there is only 1 text input in the form.

This bug was initially found with the WeCount website development. See WeCount issue ticket

Comments

  • Justin Obara commented 2020-06-03T09:35:47.431-0400

    A couple things to keep in mind when addressing this issue:

    • A form submission may be required for saving the preferences depending on how the integrator chooses to store the preferences
    • The preference editor may not be contained inside of a form element.