Description
When calling the attachment popup window in a content page, it will appear at the top of a form and not in the viewport if the top of the form has scrolled off the window.
Steps to Reproduce
- Modify any catalog item to include a button for attachments at the bottom, the longer the form the easier the problem is to see.
- Include that item in an ESS page.
- Scroll to the bottom of the ESS page and click the attachments button.
- The 'Add attachment' window will appear at the top of the form regardless if the top of the form is visible.
Workaround
Modify your custom UI Macro adding "parent.scrollTo(0, 0);" in the "onclick" before the attachment popup button.
For example:
<button id="attachmentButton" onclick="saveCatAttachment(gel('sysparm_item_guid').value, '$[item_table]')">Add attachment</button>
Change to:
<button id="attachmentButton" onclick="parent.scrollTo(0, 0); saveCatAttachment(gel('sysparm_item_guid').value, '$[item_table]')">Add attachment</button>
Related Problem: PRB634811