Moving elements beyond the border of a pool is possible when moving it outside the viewport
#2,210 opened on 2024年7月31日
説明
Describe the Bug
Restricting the movement of an element inside the "RulesProvider" module can be bypassed by moving an element outside the viewport. With this, it is for example possible to stack pools on top of each other, see GIF.
Steps to Reproduce
- Create a new model with two pools
- Moving the pools on top of each other does not work
- Move the viewport so that one pool is barely visible
- Now move the second pool beyond the viewport, on top of the other pool
- The pool can be dropped, even though it is normally not possible
Result: The pools can be stacked on top of each other.
Or:
- Create a new model with a pool
- Create a Startevent inside of it
- Try to move the element outside the pool's border
- Now move the element beyond the viewport
Result: The element is moved to the position. Even though the pool increases its size afterward to contain the element, I would still argue that this is not intended behavior because moving the element beyond the border of the pool is otherwise restricted.
Expected Behavior
The current viewport should be considered when moving elements. Locally, I could fix this by preventing any movement beyond it. In the case provided above, I would expect, that I am unable to move the element beyond the viewport. The pool should only increase in size if I drop the element close to the edge of the pool, but not far beyond its borders.
Environment
- Browser: Chrome v127.0.6533.73
- OS: Windows 11 Enterprise
- Library version: 17.6.4, als [e.g. 2.0.0] demo.bpmn.io