moneyadviceservice / dough

Reusable UI components
http://www.madewithdough.org.uk/
MIT License
9 stars 1 forks source link

Post messages v5.43 #344

Closed davidtrussler closed 3 years ago

davidtrussler commented 3 years ago

TP-12085 & TP-12218

This work creates a new generic PostMessages component in Dough.

This component has been created to solve the issues identified in the cards above: that the jump links on two tools (Debt Advice Locator and Redundancy Pay Calculator) are not working. This is caused by problems associated with changing the scroll position of a parent window in response to events fired from a different browsing context (content within an iFrame).

The solution is to allow some communication between the two contexts via the postMessage method, in this case the value of the vertical offset of the required elements are sent to the parent window allowing a scroll event to take place in that context in a controllable way.

The component has been designed to be used for the problems identified on these tools and extended where necessary if other problems arise that need the ability to communicate across contexts.

masbuild commented 3 years ago
1 Warning
:warning: English locale contains keys missing in Welsh locale. Missing keys: ["taken", "taken"].

At Money Advice Service, we use Danger gem, to ensure that our commits and pull requests follow standards. If you think one of the points here has been raised in error (or shouldn't be in our standards), open an issue or pull request on our Danger config.

Generated by :no_entry_sign: Danger

benlovell commented 3 years ago

No longer needed.