Closed
Bug 24694
Opened 26 years ago
Closed 25 years ago
Can't get out of link insertion
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: akkzilla, Assigned: mozeditor)
References
Details
Attachments
(2 files)
2.46 KB,
patch
|
Details | Diff | Splinter Review | |
3.15 KB,
patch
|
Details | Diff | Splinter Review |
Start composer. Type a few chars, then press the link button (selection collapsed).
Type something for the link text, and something for the link reference, and hit ok.
The link goes in, but the selection is inside the link. Type a few more chars,
observe that you're still inside the link. Hit return a few times, and a few
more chars; you're still inside the link. Hit the HR button: the link is split,
so any text you type below the hr is still inside the link.
I would suggest:
1. Link insertion should leave the selection outside the link when done.
2. Inserting a break when in a link should end the link, not split it.
3. Inserting a non-text node when in a link should end the link, not split it.
Points 2 and 3 are definitely arguable.
I can't test what happens in 4.x because the link dialog crashes 4.61/linux
every time.
Assignee | ||
Comment 1•26 years ago
|
||
in 4.5 we have a "remove all styles" toolbar thingy. You can click on that and
further typing will not be in the link. Are we going to have anything like this
on our 5.0 ui?
Comment 2•26 years ago
|
||
Getting out of a link is much easier than in 4.x, but not if link is the last
think inserted in the page. Thanks for the bug, as it reminds me that we did
plan to insert the link and a non-link space after it, so this behavior wouldn't
happen. We broke the old "Remove all styles" into 2 parts in 5.0: Remove text
styles and Remove Link(s). It seems the latter should behave as "Terminate/Stop
link" when the selection is a caret.
As to your suggestions 2. and 3., I guess it might not be a bad idea to end the
link, but you're not suggesting removing the link associated with the right
side after spliting a link with a break or non-text insert, are you?
This sounds like a good newsgroup topic!
Status: NEW → ASSIGNED
Target Milestone: M14
Reporter | ||
Comment 3•26 years ago
|
||
In fact, that was what I was suggesting, and I know it's arguable; if everyone
thinks it would be dreadfully unintuitive I'll be happy to withdraw either or
both the second and third suggestions. I was just wondering how often people
actually want items like a br or an hr inside a link.
Updated•26 years ago
|
Whiteboard: [PDT+]
Comment 4•26 years ago
|
||
After serious consideration, making sure a link is padded with spaces should
be done in a more central location in the rules code, since the same checking
must be done when pasting HTML. Sorry to give Joe another bug, but he's the
expert at this sort of thing. There isn't time to do this work for M14, so
setting to M15.
To ease this problem, I'll try to figure out what's wrong with RemoveLink
method so user can use that to terminate a link (bug 26994)
Assignee: cmanske → jfrancis
Status: ASSIGNED → NEW
Reporter | ||
Comment 5•26 years ago
|
||
Taking this bug since Joe is overloaded with PDT+ stuff. I have a fix that
ought to fix it (changing CreateBogusNodeIfNeeded to insert a bogus node at the
end of the document if we just inserted a non-text node and there's nothing
editable after it), but it turns out that it triggers the "strange position for
XIC" assertion (which is also a PDT+ bug, and which is also triggered when you
delete everything in the document) and although the caret appears to be in the
right place after the insert link, if you type, the characters end up in the
wrong place.
Assignee: jfrancis → akkana
Depends on: 26441
Whiteboard: [PDT+] → [PDT+] have probable fix, but dependant on 26441
Reporter | ||
Comment 6•26 years ago
|
||
Accepting. I'll also attach my current patch, in case Joe has time to look at
it. Since it changes the rules code handling of the bogus node a bit, I'd like
to get Joe's blessing that it's okay to have a bogus node in a non-empty
document.
Status: NEW → ASSIGNED
Reporter | ||
Comment 7•26 years ago
|
||
Reporter | ||
Comment 8•26 years ago
|
||
That patch was broken. Here's a better one, which inserts the bogus node in the
right place and appears to put the caret in the right place as well (before the
newly created bogus node). Unfortunately, typing doesn't work after this, and
I'm not sure why.
Reporter | ||
Comment 9•26 years ago
|
||
Reporter | ||
Comment 10•26 years ago
|
||
Typing doesn't work afterward because of 27742 -- there's something weird about
the InsertLink dialog that confuses the event state manager and leads to a
crash. This happens even without my patch.
Reporter | ||
Comment 11•26 years ago
|
||
Joe has a fix that fixes the caret-warping problem. When my fix is combined
with Joe's fix, I can now type stuff after the link, and it goes into a new text
node and not into the link. Also, I can click after the link and then type, and
what I type is not part of the link.
Whiteboard: [PDT+] have probable fix, but dependant on 27742 → [PDT+] have fix, awaiting review
Reporter | ||
Comment 12•26 years ago
|
||
I've checked in the nsTextEditRules.cpp part. Joe, this needs your
pointer-warping code in nsHTMLEditRules in order to make this work. Reassigning
to Joe so he can check in his part.
Assignee: akkana → jfrancis
Status: ASSIGNED → NEW
Assignee | ||
Comment 13•26 years ago
|
||
pointer warping code? I'm confused. Do you just mean the nsHTMLEditRule.cpp
changes that I gave you? Or is something more needed? Accepting bug.
Status: NEW → ASSIGNED
Assignee | ||
Comment 14•26 years ago
|
||
ok, I need to rework this a bit. The first fix casued bug 27959.
Comment 15•26 years ago
|
||
A comment was made last week:
--- Additional Comments From cmanske@netscape.com 2000-02-09 12:03 ---
After serious consideration, making sure a link is padded with spaces
should be done in a more central location in the rules code, since
the same checking must be done when pasting HTML.
Padding spaces around links may be OK for English, but not for other
languages such as Japanese or Chinese which do not normally separate
words with spaces.
Assignee | ||
Comment 16•26 years ago
|
||
I have a fix in hand now. It doesn't use any added spaces. awaiting approval
Whiteboard: [PDT+] have fix, awaiting review → [PDT+] have fix, awaiting approval
Assignee | ||
Comment 17•26 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 18•25 years ago
|
||
this doesn't look fixed..also using remove all styles keeps it in link mode
and makes the text link italic!
Akkana, does this look fixed for you?
Comment 19•25 years ago
|
||
Akkana and I both tested this again and its still not fixed in today's
2/23 build.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 20•25 years ago
|
||
REmove All Styles is broken. If you have a collapsed selection in regular text,
Remove All Styles makes further typing be bold + italic + underline! You or I or
someone should file a seperate bug on this.
I'm surprised that inserting a link leaves you inside the link. It doesn't for
me. When I type after inserting a link, I get non-link style.
Comment 21•25 years ago
|
||
I did file a bug for the remove style issue this afternoon...
Comment 22•25 years ago
|
||
Please give us ETA for fix in the Status Whiteboard.
Whiteboard: [PDT+] have fix, awaiting approval → [PDT+]
Assignee | ||
Comment 23•25 years ago
|
||
I know the jist of whats going wrong here. Sometimes there is no break node
after the link, in which case selection has no choice but to be in the link
(assuming the link is at the end of the document, or even the end of a block).
This shouldn't take more than a couple of hours to fix. I should be able to get
to it tomorrow (Thursday).
Whiteboard: [PDT+] → [PDT+] 2/24/00
Comment 24•25 years ago
|
||
i cant reproduce this joe test on your system
Assignee | ||
Comment 25•25 years ago
|
||
I'd like to remove this from PDT+ consideration, for the following reasons:
First, the bug now only shows up in some circumstances, rather than all the time
(note that when Mike looked into this he couldn't reproduce it).
Second, since we have "Remove Link" menu item working, the user has a workaround.
I could fix this, and probably pretty quickly, but I'd have to make changes that
are high risk. I would rather do this carefully during M15.
Whiteboard: [PDT+] 2/24/00
Comment 27•25 years ago
|
||
remove beta1 and PDT-; move to M15
Assignee | ||
Comment 28•25 years ago
|
||
fixed
Status: REOPENED → RESOLVED
Closed: 26 years ago → 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•