🐛(frontend) fix phantom selection issue between nodes#126
🐛(frontend) fix phantom selection issue between nodes#126
Conversation
| paddingTop={10} | ||
| paddingBottom={10} | ||
| rowHeight={35} | ||
| rowHeight={50} |
There was a problem hiding this comment.
I guess it is just for dev purpose, no?
There was a problem hiding this comment.
Yes you guessed right aha
| onMouseDown={handleRowMouseEvent} | ||
| onClick={handleRowMouseEvent} | ||
| onKeyDown={handleKeyDown} |
There was a problem hiding this comment.
I find handleRowMouseEvent does not solve the root problem, it is more a patch.
The root problem seems to have the children that is not the same height as the parent, on Docs c__tree-view--row is 35px, when the child is --docs-sub-page-item 30px, could we have the child that inherit from the parent height instead, and add a margin in c__tree-view--row to keep the space between rows ?
If we do that I have the feeling we will not need to add this pathc, wdyt ?
There was a problem hiding this comment.
Or rowHeight could be a prop as well, to fit the app need.
There was a problem hiding this comment.
This is a good catch and I agree, when I manually set the PX of c__tree-view--row the bug disappear,
So make a rowHeight prop is a great idea imo
5feb6b6 to
7f76e59
Compare
prevents invisible selections when switching between node elements Signed-off-by: Cyril <c.gromoff@gmail.com>
7f76e59 to
24b921f
Compare
Purpose
This PR fixes a phantom selection issue that occurred when switching between nodes in the document editor. It ensures that no invisible selection persists when moving between elements.
To test it just ajust rowHeight in TreeView to 50 and clic between nodes
issue : 1472
Before :
internodebefore.mp4
After:
internodeafter.mp4
Proposal