User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 See STR. Reproducible: Always Steps to Reproduce: 1. Open "View Source" for any webpage. You get the "View Source" window with the blinking cursor at the beginning of the HTML text. ALTERNATIVE #1: 2. While the cursor is visible, press "End". ALTERNATIVE #2: 2. Press "Home" and "End" alternatingly very quickly. Actual Results: IN ALTERNATIVE #1: Cursor moves down one line, stays there for the duration of one blinking interval, then moves to the expected position. IN ALTERNATIVE #2: Cursor moves back and forth between beginning of first line and beginning of second line. Expected Results: IN ALTERNATIVE #1: Cursor moves to end of line. IN ALTERNATIVE #2: Cursor moves back and forth between beginning and end of first line. The same happens anywhere else in the source, not just at the beginning.
Status: UNCONFIRMED → NEW
Component: View Source → Selection
Ever confirmed: true
OS: Windows 2000 → All
Product: Toolkit → Core
QA Contact: view.source → selection
Hardware: PC → All
Version: unspecified → Trunk
The problem here is that MoveCaret() calls TakeFocus() (who notifies listeners, who draw the caret) before updating mHint. So when the caret is drawn for the first time, it's using the wrong hint. This fix tries to ensure that mHint is set whenever the selection range is replaced or extended (using TakeFocus()), but not otherwise. I should mention here that TakeFocus() is a horrible piece of crap, and should probably be completely rewritten, or at least extensively refactored (starting from its name - as it has nothing to do with focus).
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #341342 - Flags: review?(roc)
Uri, I hope its ok when I set the checkin-needed keyword here. So we didn't miss it when the tree is re-opened again.
Sure, no problem.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
I'm not able to verify the fix on OS X. Aleksej, are you able to on Linux?
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.