Easier to see in action that try to describe in written form. In summary, when using a custom template popup the popup opens in read mode on subsequent invocations. Also, the template field itself becomes “single clickable” instead of requiring a double click to open the popup.
Steps to reproduce:
- Create new page from XML below
- Attempt to single click either the “Name - Default Popup” or “Name - Custom Popup” field. Expected Result is encountered, single click does nothing on either field
- Double click the “Name - Default Popup” field or click the pencil for the field
- Dismiss the dialog with “Done” or “X”
- Hover over the “Name - Default Popup” field and you will notice the cursor pointer. Single click the field and the popup will appear. Note that the popup is in edit mode.
Field “edit” can be triggered via single click
Field Requires double click same as on initial display
- Dismiss the “Name - Default Popup” dialog via “Done” or “X”
- Hover over the “Name - Custom Popup” field and you will notice cursor pointer. Single click the field and the popup will appear. Note that the popup is in read mode.
a) Field “edit” can be triggered via single click;
b) Popup is in “read” mode
a) Field Requires double click same as on initial display
b) Popup should be in edit mode
- For custom popups, it appears the dialog is not being destroyed on close (dialog is destroyed on default popup) and hence not rebuilt/re-rendered on subsequent invocations
- If the pencil edit icon is clicked in Step #7 instead, the dialog displays in edit mode as expected. The problems described above revolve around the “single click” on the field (and the dialog not getting destroyed)
- For the single click behavior, after the first time edit mode is invoked, click events are registered and mouse pointer set. The challenge here is two-fold: 1) The behavior is different for the user the first time and subsequent times; and 2) if the template contains hyperlinked information (e.g. reference field), depending on where they single click, they could go to another object or trigger the edit dialog.
- Destroy popup on close for custompopup or ensure components are re-rendered in edit mode on open
- Remove the click event handler and mouse pointer on the field element so that behavior 1st time and subsequent times is consistent and to avoid confusion with other hyperlinked items in the template field.
Name - Default Popup
Name - Custom Popup