The Dough tooltip component currently always displays in the same position, meaning that in some circumstances it appears relatively distant from the icon that triggers it. This is particularly noticeable on the Debt Advice Locator tool and creates a confusing user experience (as below).
The work in this PR sets the position of the popup to be related to the trigger position (see below). This is aligned with a lateral variation depending on the trigger position relative to the centre of the page so that the popup will not display off-screen.
TP9392
The Dough tooltip component currently always displays in the same position, meaning that in some circumstances it appears relatively distant from the icon that triggers it. This is particularly noticeable on the Debt Advice Locator tool and creates a confusing user experience (as below).
The work in this PR sets the position of the popup to be related to the trigger position (see below). This is aligned with a lateral variation depending on the trigger position relative to the centre of the page so that the popup will not display off-screen.