When typing within a link tag, the Enter key should automatically end the current link tag before inserting the <br>. If there is any more link content (i.e., we were not at the end of the link), then the folling content should still retain the link. It seems that would be accomplished by splitting the existing link first, so the effect is as if the <br> is inserted between new </a> and <a> tags. We don't want to generate empty <a></a> tags at the end, though.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
*** Bug 100761 has been marked as a duplicate of this bug. ***
No esta EDITORBASE
Whiteboard: EDITORBASE; 1 day; → 1 day;
Target Milestone: mozilla0.9.9 → Future
I don't know! People find this very annoying! We definitely need to easily terminate a link. This suggestion seemed like a very good one to solve problems such as those in 94783. Joe: How hard is this to do? Adding glazman to see if he's interested in investigating.
I think I agree the issue exists but disagree with the proposal because I see web sites having image legends made of multiline anchors. Example : <td align="center"> <a href="foo.html"><img src="foo/gif" border="0">Click here<b> if you want to<br> contact us</a> </td> I certainly don't want to generate three different anchors with the same href for the example above when I create the two BRs.
How about pressing esc instead? or tab (which might be good, since tab is just whitespace, we convert tab into a single space terminating ALL elements to start a new one.
I don't think Tab is a good idea -- it is already overloaded to mean "indent", "go to next table cell", or "insert spaces to simulate a tab character". I'm supposed to resolve these issues in bug 98624 and I don't need another behavior to confuse things further! Esc key sounds like an interesting idea -- maybe use that instead of the less discoverable "Shift+Ctrl/Cmd+K" keybinding for terminating a link? Note that we are moving in the direction of making "Enter" key mean "end paragraph" and do better HTML behavior like inserting <p> instead of <br>. When we do that, Shift+Enter will be used to enter a <br> instead (that is a reasonably standard word-processing action.) Thus if we let Enter automatically terminate a link, then Shift+Enter can be left to *not* terminate the link for the case that Daniel describes.
*** Bug 142879 has been marked as a duplicate of this bug. ***
fixed by 172147 checkin
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.