I am in the process of creating a panel with a specific area where users can resize it by dragging their mouse cursor. However, instead of moving smoothly, the panel unexpectedly jumps in size before becoming resizable.
Upon inspecting the element, I noticed conflicting information that is quite puzzling. The computed width seems to be much larger than what I have set using element.style.width
. When I try to trace back where this unexpected width value is coming from, the developer tools then display the width reflecting my style change. It appears as though the width value is being recycled somehow, even after updating variables.
https://i.sstatic.net/gcubE.jpg
https://i.sstatic.net/97nle.jpg
I am struggling to understand why this issue is occurring. Any assistance in clarifying this matter would be greatly appreciated.
Feel free to check out my code here: https://codesandbox.io/s/great-platform-xkxhy2?file=/src/index.mjs