Closed
Bug 95654
Opened 23 years ago
Closed 22 years ago
caret appears misplaced with respect to <HR> when I hit BACKSPACE
Categories
(Core :: DOM: Editor, defect, P4)
Tracking
()
VERIFIED
FIXED
M1
People
(Reporter: shrir, Assigned: mozeditor)
References
Details
(Whiteboard: [caret]EDITORBASE+; fixinhand)
Attachments
(1 file)
4.04 KB,
patch
|
glazou
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
win nt trunk 0815 add a hr , hit ENTER , HIT BACKSPACE once ..observe the caret position, it's top is almost in line with the <HR>, you have to hit backspace once more to get it in the correct position.
Comment 1•23 years ago
|
||
g
Assignee: beppe → mjudge
Severity: normal → trivial
Priority: -- → P4
Whiteboard: [caret]
Target Milestone: --- → mozilla1.0
Comment 2•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Updated•22 years ago
|
Whiteboard: [caret] → [caret]EDITORBASE
Comment 3•22 years ago
|
||
I can't reproduce this, but I have the fix to bug 159207 in my tree. I think these recent changes by mjudge will fix this too. Please test after fix for 159207 is checked in.
Depends on: 159207
the selection code is working fine. the only problem is that when you are hitting return you get 2 BRs one after the HR then another on next line. since the HR forces a newline you actually have 3 . first is the HR second is the first BR and the third is caused by the second BR. I will give this to jfrancis to let him decide if this rule decision is a bug.
Assignee: mjudge → jfrancis
Assignee | ||
Comment 5•22 years ago
|
||
probably very simple...
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0.1 → M1
EDITORBASE+ per editorbase triage
Whiteboard: [caret]EDITORBASE → [caret]EDITORBASE+
Assignee | ||
Comment 7•22 years ago
|
||
hey, it helps to attach the patch if I want reviews, doesn't it? This patch changes the WillInsertBreak() code to see if we are right after a block (note that HR's count as blocks for this purpose). If we are than instead of putting selection after the inserted br, it puts it before. You could get the same bug as originally described using a table instead of an hr, for instance. it's just harder to do the test case. I had to edit source to make it happen. Anyway, this patch fixes it for HRs, Tables, etc... The last diff in the patch is just a correction of some stale comments. It's unrelated to the bug.
Assignee | ||
Comment 8•22 years ago
|
||
just to clarify, placing the selection before the inserted br prevents the postprocessing code from inserting the second br. Thus the extra br Mike mentions no longer occurs after this patch. Also, for QA: This bug has morphed from the original report. now the test case is: 1) insert HR 2) hit enter result: you are two lines below the HR expected result: you are one line below the HR
Whiteboard: [caret]EDITORBASE+ → [caret]EDITORBASE+; fixinhand; need r=, sr=
Comment on attachment 98318 [details] [diff] [review] patch to nsHTMLEditRules.cpp yep... r=glazman
Attachment #98318 -
Flags: review+
Comment 10•22 years ago
|
||
Comment on attachment 98318 [details] [diff] [review] patch to nsHTMLEditRules.cpp sr=kin@netscape.com
Attachment #98318 -
Flags: superreview+
Whiteboard: [caret]EDITORBASE+; fixinhand; need r=, sr= → [caret]EDITORBASE+; fixinhand
Assignee | ||
Comment 11•22 years ago
|
||
fix landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 12•22 years ago
|
||
verified according to Joe's new testcase...however now I see a new problem: 1) insert HR 2) hit enter 3) hit backspace the HR disappears! shouldn't the caret be at the end of the HR ? new bug report filed for this: bug 169213
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•