How to position the flyout just above the button, when the browser is resized ? The application has a button, which on click shows a flyout (WinJS flyout). But when the browser is resized the flyout doesnot always appear to be above the button.
Asked
Active
Viewed 80 times
1 Answers
0
The issue was that one of the elements was scaled. WinJS dowsnot consider the scaling factor while calculating the offset for the flyout. The solution was to pass a fake div (height, width as zero), and calculate the offset on it, which will later be used as an anchor for the flyout.

stackHelp
- 193
- 1
- 2
- 13
-
Glad you found a solution. It would be good to file this as an issue on https://github.com/winjs/winjs/issues as it doesn't look like it's logged yet. – Kraig Brockschmidt - MSFT Feb 10 '15 at 22:30
-
Will file it soon. I have another issue with WinJS flyout, the flyout (element.wincontrol.hide()) operation takes a little more than expected time to close the flyout. Because of that two flyouts appear to be overlapped for a few seconds. Do you know if there is an existing issue or any similar for this ? – stackHelp Feb 11 '15 at 00:22
-
Just search the issues for "flyout" and you can check. That is: https://github.com/winjs/winjs/issues?q=is%3Aissue+is%3Aopen+flyout. A quick glance doesn't show something like that but I didn't read them all. – Kraig Brockschmidt - MSFT Feb 11 '15 at 04:36