Closed keith-kurak closed 7 years ago
cool, I'll test this and should have it merged soon. thanks.
I still see this issue - I believe it is caused because the windowWidth
and windowHeight
are hardcoded at the top of the file. If those are changed to var
instead of let
, and the call to set those are moved to render
it seems to work properly.
When starting the app with the device in landscape mode and then rotating to portrait, the MessageBar appears and takes up half the screen (I didn't even suspect this was the MessageBar until I opened the element inspector). This does not happen if you start in landscape, make a message appear, and then rotate- it only happens if no messages appear.
It appears that the appropriate offsets were not set to null based on the position until setNewState() was called, which (usually) happens on the first message. Therefore, all offsets changed by _changeOffsetByPosition() were initially set by zero. I'm not entirely sure why this does what it does, but it was the one difference I could identify between before-first-message and after-first-message, and it seems to fix this issue.