I believe this will be hard to reproduce in a demo, so I will just link to my repo.
The bug is still available when checking out this commit. I fixed it in this commit.
I found the cause of the bug and fixed it by removing some settings, but this might be of interest to maintainers of InteractJS.
A bit of context: I am recreating Windows XP for fun, so when I write 'minimize' you can probably figure out what I mean, but the element is removed from the DOM and kept in memory inside a property of the object.
Expected behavior
Resizing from the bottom, bottom left corner or the bottom right corner should not mess up the size of the element after removing and adding it to the DOM.
Actual behavior
I also added these notes to my fix, but here they are:
Resizing caused the element's window shrink to it's smallest height possible after being minimized, then unminimized and then resized from the bottom, bottom left corner or the bottom right corner.
this does not happen when you close the window by clicking the close button and then open it again
The events are not added twice when opening after minimizing, I checked
The bug goes away after closing and re-opening the window
The bug does not happen when resizing from the top right corner after minizing
The bug does not happen when resizing from the top left corner after minizing
The bug does not happen when resizing from the left border after minizing
The bug does not happen when resizing from the right border after minizing
The bug does not happen when resizing from the top right corner after the bug has happened
The bug does not happen when resizing from the top left corner after the bug has happened
The bug does not go away when removing restrictSize
The bug goes away when removing restrictEdges
System configuration
interact.js version: "^1.3.4"
Browser name and version: Chrome 70.0.3538.102 (Official Build) (64-bit)
Operating System: Ubuntu 18.04
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I believe this will be hard to reproduce in a demo, so I will just link to my repo. The bug is still available when checking out this commit. I fixed it in this commit.
I found the cause of the bug and fixed it by removing some settings, but this might be of interest to maintainers of InteractJS.
A bit of context: I am recreating Windows XP for fun, so when I write 'minimize' you can probably figure out what I mean, but the element is removed from the DOM and kept in memory inside a property of the object.
Expected behavior
Resizing from the bottom, bottom left corner or the bottom right corner should not mess up the size of the element after removing and adding it to the DOM.
Actual behavior
I also added these notes to my fix, but here they are:
Resizing caused the element's window shrink to it's smallest height possible after being minimized, then unminimized and then resized from the bottom, bottom left corner or the bottom right corner.
System configuration
interact.js version: "^1.3.4" Browser name and version: Chrome 70.0.3538.102 (Official Build) (64-bit) Operating System: Ubuntu 18.04
I hope this helps!