Clicking on multi-line selection inside inline editor jumps scroll position way downward #10590
Description
New repro steps with Getting Started project
- Open Getting Started project and open index.html
- Scroll down to the
<h3>
on line 61 ("Quick Edit for CSS and JavaScript") - Invoke Quick Edit on the
<h3>
tag - Within the inline editor, create a text selection that spans > 1 line
- Click the selection
If it doesn't repro, scroll so the <h3>
is further down from the top of the viewport before step 3, or make your window less tall.
Old repro steps with JS inline editor
- Open Editor.js in the Brackets source
- In the Editor constructor, place the cursor on the
_getModeFromDocument()
call and press Ctrl-E - Inside the inline editor, drag to select some text
- Click on the selected text
Result: scroll position jumps down about 250 lines, and focus is lost from the editor
Expected: selection cleared and cursor remains in inline editor
This looks like a regression due to PR #9584 -- if I disable text drag & drop via preferences, the bug goes away. CC @marcelgerber
I'm only able to repro this in the JS inline editor -- not in the CSS inline editor. If it occurred in the CSS inline editor I think we'd want to block the 1.2 release until a fix is available (or make drag & drop off by default). If it really only repros in the JS inline editor, I'm less sure... Seems like we should investigate to at least see if there's an easy fix, though.