Closed Bug 642588 Opened 10 years ago Closed 10 years ago

Clean up the drag & drop caret on the editor correctly when the mouse leaves the editable field

Categories

(Core :: DOM: Editor, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file, 1 obsolete file)

Our current caret cleanup code has two problems.  One of them is that we don't clean up the caret correctly on dragexit (the same way that we do on drop), and the second problem is that we cache the created caret, which is unnecessary, and could probably cause us to use a stale caret object if the presshell dies, for example.

I have a patch which fixes both of these issues.
Attached patch Patch (v1) (obsolete) — Splinter Review
Attachment #520019 - Flags: review?(roc)
Blocks: 638394
Attached patch Patch (v2)Splinter Review
Let's clean this up even more.  The caret itself tracks its drawn status, so maintaining it in nsEditorEventListener is both error prone and useless, so let's get rid of mCaretDrawn altogether.
Attachment #520019 - Attachment is obsolete: true
Attachment #520046 - Flags: review?(roc)
Depends on: post2.0
http://hg.mozilla.org/mozilla-central/rev/bf031c2743d5
Status: NEW → RESOLVED
Closed: 10 years ago
No longer depends on: post2.0
Resolution: --- → FIXED
Whiteboard: [post-2.0]
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.