When implementing the Drag & Drop for the site, I ran into a strange glitch. Sometimes mouse events were not handled at drop'e. At the same time, the glitch was not constant, which made it difficult to debug.
After a thorough analysis of the situation, it was possible to identify a pattern: if you hold down the mouse button, then, in this state, move the mouse to the layer that has position: fixed in CSS - mouse events on this layer are not processed at all. The situation seemed very strange to me. Once again, I checked everything thoroughly, I wrote off the bug report in Mozilla (
https://bugzilla.mozilla.org/show_bug.cgi?id=449579 ). There is also a test case of this glitch. Glitch confirmed, but it is still not fixed.
This situation does not make it possible to make a drop on the area with position: fixed without resorting to distortions.
For myself, I applied the following solution:
- At the beginning of the dredge, we set all layers for which position: fixed in position: absolute, taking into account the coordinates on the page and the position of the scroll bars.
- Do the drop
- Return position: fixed
All this time you need to keep track of the position of the scroll bars and if it has changed drag the layers because the user can spin the mouse wheel or scroll the page in another way. Unfortunately, at the same time there are flashes, from which so far it was not possible to get rid of. But, fortunately, this situation is quite rare.