Dialog: Fix positioning adjustments when dialog goes out of bounds
In particular, fixes floating popups getting flipped instead of pushed in bounds at the right edge.
In particular, fixes floating popups getting flipped instead of pushed in bounds at the right edge.
mentioned in commit 14cf214d