-
Notifications
You must be signed in to change notification settings - Fork 165
[terra-form-select] Fixed page jump within an Iframe/Embedded Browser #2773
Conversation
### Fixed | ||
* Fixed Page Scroll Issue of form-select. | ||
* when form-select is used with-in Iframe / Embeded browser clicking on toggle button to open dropdown scrolls page to top of the window. | ||
* This error was discovered in powerchart application which uses Iframe to render Terra-components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove internal specific implementation from the change log list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed : a428f6c
@@ -3,6 +3,10 @@ ChangeLog | |||
|
|||
Unreleased | |||
---------- | |||
### Fixed | |||
* Fixed Page Scroll Issue of form-select. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these entries be consolidated? Each item in a list should be for a specific change, here there are three asterisks for one entry.
Example:
### Fixed
* Fixed page scrolling when embedded within an iframe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, updated change-log
@supreethmr can you add the wdio test case for testing this changes using iframe. with tiny or small viewports ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 with Akarsh's suggestion as well
Added here : 5d47bff |
Summary
Resolves #2682
Additional Details
Page jump was happening at two scenarios where one is when single-select is opened before selecting dropdown items and another one is opening form-select when selection has been made.
Focus to menu(dropdown) was setting in opendropdown() method which triggers before PositionDropdown causing page to scroll to the top on form-select open.
scrollIntoView() is called to scroll into active option on dropdown open. ScrollIntoView causes page Jump as shown in Issue when used within Iframe. Hence replaced ScrollIntoView with ScrollTop of menu ( dropdown ).