Open
Bug 47040
Opened 24 years ago
Updated 3 years ago
HTML Source mode doesn't put caret (cursor) and selection where it was in WYSIWYG
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
Tracking
(Not tracked)
NEW
People
(Reporter: Brade, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: helpwanted)
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
HTML Source mode doesn't put caret where it was in wysiwyg.
I expect that when I toggle between the wysiwyg and edit source modes that my
caret won't be moved on me. Instead, even if I don't make any changes, the caret
always goes to the top of the document.
Comment 2•24 years ago
|
||
Sorry, must wait for multiple editor support for one docshell so we can use
the full text editor for HTML Source editing. This isn't possible with current
implementation.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 5•24 years ago
|
||
I don't think showing source for selection in browser (28809) has much to do with
this request. The HTML Source editor is a separate text editor and will use the
new embedable text editor to be develeped during current 6.5 work.
Reporter | ||
Comment 8•23 years ago
|
||
*** Bug 119090 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 9•23 years ago
|
||
*** Bug 107773 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 10•23 years ago
|
||
*** Bug 118489 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
*** Bug 141107 has been marked as a duplicate of this bug. ***
Comment 12•23 years ago
|
||
Please note that switching out of HTML Source view to any other view exhibits
the problem, not just wysiwyg mode
Comment 13•23 years ago
|
||
*** Bug 142293 has been marked as a duplicate of this bug. ***
Comment 15•22 years ago
|
||
*** Bug 169546 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 16•22 years ago
|
||
*** Bug 167231 has been marked as a duplicate of this bug. ***
Comment 17•22 years ago
|
||
*** Bug 181985 has been marked as a duplicate of this bug. ***
Comment 18•22 years ago
|
||
*** Bug 188258 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 19•22 years ago
|
||
*** Bug 193250 has been marked as a duplicate of this bug. ***
Comment 20•22 years ago
|
||
adding "cursor" to the summary to make this one easier to find.
Summary: HTML Source mode doesn't put caret where it was in wysiwyg → HTML Source mode doesn't put caret (cursor) where it was in wysiwyg
Comment 21•22 years ago
|
||
*** Bug 203967 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 22•21 years ago
|
||
*** Bug 208853 has been marked as a duplicate of this bug. ***
Comment 23•21 years ago
|
||
I agree with comment 12, the summary of this bug needs to be rephrased - it
isn't related to wysiwyg mode, but to switching out of the source pane.
The summaries of most of dupes would be just fine.
Prog.
Comment 24•21 years ago
|
||
Selection state should be preserved too, similar to as currently Frontpage does.
Comment 25•21 years ago
|
||
Updating summary
Summary: HTML Source mode doesn't put caret (cursor) where it was in wysiwyg → HTML Source mode doesn't put caret (cursor) and selection where it was in WYSIWYG
Comment 26•21 years ago
|
||
*** Bug 231077 has been marked as a duplicate of this bug. ***
Comment 27•20 years ago
|
||
(In reply to comment #26)
> *** Bug 231077 has been marked as a duplicate of this bug. ***
When going out of source and into normal, the cursor disappears entirely. It can
only be brought back by clicking on the page or with down arrow (cursor goes to
bottom of page) or with up arrow (cursor goes to top of page).
Comment 28•20 years ago
|
||
*** Bug 244864 has been marked as a duplicate of this bug. ***
Comment 29•20 years ago
|
||
*** Bug 253064 has been marked as a duplicate of this bug. ***
Comment 31•20 years ago
|
||
This patch switches from a b&w source view to a colored source view (this is
bmo bug 58730) and preserves the selection when switching from
Normal/AllTags/Preview to Source view. Since this patch applies viewsource.css
to the view, it also fixes bmo bug 100913.
Not fixed by this patch:
1. the source view is not scrolled to show selection in the viewport. I don't
know why but scrollSelectionIntoView() just does not work on
gSourceTextEditor's selection controller
2. the selection is not preserved switching back from Source View to another
one; this is considerably harder than the other way, given our
architecture
I suggest to deal with the two issues above in separate bugs.
Reviews welcome.
Comment 32•20 years ago
|
||
Warning: I forgot to mention the colors are dynamic. If you change the source,
the colors won't adapt to your changes. I wanted it to stand in a different bug.
Status: NEW → ASSIGNED
Comment 33•20 years ago
|
||
Urgh...
Please read "I forgot to mention the colors are **NOT** dynamic" in the previous
comment. Sorry for spam.
Comment 34•20 years ago
|
||
Daniel: I think you may have to "formally" request a review of your patch. :-\
Comment 35•20 years ago
|
||
Comment on attachment 158416 [details] [diff] [review]
fix #1
Neil, can you s[r] please ?
Attachment #158416 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 36•20 years ago
|
||
Apart from suggested theme tweaks to make the doctype blend in I found a couple
of niggles: the selection nodes are left in the document and confuses cursor
movement past them, and the regexp contains a lone ' which confuses vim.
Presumably some other bug is preventing the caret from appearing in all modes.
Reporter | ||
Comment 37•20 years ago
|
||
Comment on attachment 158416 [details] [diff] [review]
fix #1
a few comments:
* is it possible to use xptr instead of storing the span tags? (I suspect not
but want to bring up the issue.)
* mozSanitizingHTMLSerializer::PreserveSelection has comment with typo:
nothin --> nothing
* Are the <span id=*> tags removed before editing in html source mode? Is the
selection maintained from source view --> wysiwyg view? (I'd guess that is much
harder and probably should be a different bug.)
* I'd like to see more use of constants / named literals such as "&"
* I assume the removal of "mFlags" from nsHTMLContentSerializer.h is because
it is in the parent class.
Great work Daniel!
Comment 38•20 years ago
|
||
The selection code doesn't work when the start range is just after a tag, either
a close or an open tag.
Example: This is bold, but this is not
Select "This is bold", press ^B, no bug in source mode
Select the ",", bug appears in source mode
Select the "This", bug appears in source mode
Click on the <b>/<span> in the struct toolbar, no bug in source mode
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 39•19 years ago
|
||
Neil's comment indicates the patch is incomplete.
Patch addresses problem in bug 58730 according to daniel.
Blocks: 58730
Comment 40•18 years ago
|
||
It would be great if the cursor position was preserved when clicking from Normal to HTML Tags, to Source to Preview. Often I'm working in the editor, and need to make a HTML level tweak.
Comment 41•17 years ago
|
||
I think this thread of bug comments oscillates between two conceptually different issues:
a) Whether the cursor is visible in the Source tab, and
b) Whether the focus stays in the same place when moving from tab to tab.
From a coding standpoint, a) and b) may be closely related, but I think they nevertheless are different issues.
To me, both are important, but b) is more important.
Comment 42•16 years ago
|
||
Daniel, Neil,
Are you still working on this ?
Updated•16 years ago
|
Priority: P3 → --
QA Contact: sujay → composer
Target Milestone: Future → ---
Updated•11 years ago
|
Attachment #158416 -
Flags: review?(neil)
Comment 44•11 years ago
|
||
Ten-year old patches usually no longer apply, nobody's working on this, and comment 36 and comment 38 suggest that this patch has problems. Cancelling review request.
You need to log in
before you can comment on or make changes to this bug.
Description
•