Hello marijn.
I registered a mouseover event in gutter. The value of the parameter line is inaccurate
My mouse has moved to the second line, but the line value is still the first line
Reproduce the demo:
flamboyant-mcnulty-5u1kk7 by AKclown using @codemirror/commands, @codemirror/view, react, react-dom, react-scripts
PS:Been asking a lot of questions lately, thanks for your patience
marijn
January 4, 2023, 12:36pm
2
That looks like it was caused by rounding errors. This patch should help.
committed 12:35PM - 04 Jan 23 UTC
FIX: Fix a bug where DOM events on the boundary between lines could get assigned…
to the wrong line.
See https://discuss.codemirror.net/t/the-line-data-obtained-by-mouseover-is-inaccurate/5517
hi,marijn。 When I set a certain height to .cm-editor。
The space behind the mouseover event will also return the row data of the last row
GIF:
In my code, I don’t want the light red dot below the second line. As well as not triggering the mousedown method. Or be able to identify the mousedown triggered in the blank area
Reproduce the demo:
flamboyant-mcnulty-5u1kk7 by AKclown using @codemirror/commands, @codemirror/view, react, react-dom, react-scripts