Last Comment Bug 198155 - midas html editing mode persists after leaving the page that enabled it
: midas html editing mode persists after leaving the page that enabled it
Status: RESOLVED FIXED
midas
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Daniel Glazman (:glazou)
: sairuh (rarely reading bugmail)
: Makoto Kato [:m_kato]
Mentors:
http://www.squarefree.com/contentedit...
: 201223 209836 215686 285801 300360 301019 (view as bug list)
Depends on: 180211 209020
Blocks: contenteditable
  Show dependency treegraph
 
Reported: 2003-03-18 21:20 PST by Jesse Ruderman
Modified: 2014-04-25 15:17 PDT (History)
27 users (show)
bugs: blocking‑aviary1.0-
asa: blocking1.8a6-
dbaron: blocking1.8b-
dbaron: blocking1.8b2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix for problem (695 bytes, patch)
2004-08-26 10:38 PDT, Mike Kaply [:mkaply]
no flags Details | Diff | Splinter Review

Description Jesse Ruderman 2003-03-18 21:20:15 PST
1. Load http://www.squarefree.com/contenteditable.html .
2. Click a personal toolbar link to http://www.google.com/, or click Home.

Result: The bookmark loads correctly, but loads as an editable document.

Expected: The bookmark should load as a non-editable document, like it does in IE.
Comment 1 Jesse Ruderman 2003-04-08 15:20:37 PDT
*** Bug 201223 has been marked as a duplicate of this bug. ***
Comment 2 Asa Dotzler [:asa] 2004-07-28 19:14:23 PDT
*** Bug 209836 has been marked as a duplicate of this bug. ***
Comment 3 Asa Dotzler [:asa] 2004-07-28 19:19:15 PDT
We've got at least 3 dupes of this and I just ran across a user who got nailed
by it in the wild.  As more high profile sites start using Midas, this is going
to only get worse. Who can help? 

bug 209836
bug 201223
bug 221172
Comment 4 Asa Dotzler [:asa] 2004-07-28 19:21:14 PDT
summary was "click bookmark while editing midas document -> loaded document is
editable" and is now "midas html editing mode persists after leaving the page
that enabled it".  Feel free to improve on that for accuracy or searchability.
Comment 5 Asa Dotzler [:asa] 2004-07-28 19:25:43 PDT
is bug 215686 also a dupe?
Comment 6 Mike Kaply [:mkaply] 2004-07-28 20:02:10 PDT
This is related to:

http://bugzilla.mozilla.org/show_bug.cgi?id=209020

It has to do with editor teardown.

We need jst.
Comment 7 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2004-08-05 13:12:28 PDT
*** Bug 215686 has been marked as a duplicate of this bug. ***
Comment 8 John Keiser (jkeiser) 2004-08-05 21:28:17 PDT
Coupled with bug 180211, this is pretty serious, as it can make the rest of the
browser session unusable and can occur by accident.  A friend of mine found the
problem in the wild at http://philips.electronics.inreview.com/ (admittedly a
spam page).
Comment 9 Ashley Bischoff (blog at handcoding.com) 2004-08-06 06:09:34 PDT
OS -> All.
Comment 10 Daniel Glazman (:glazou) 2004-08-24 04:03:19 PDT
Blocks 'contenteditable' feature...
Comment 11 Daniel Glazman (:glazou) 2004-08-25 00:20:26 PDT
Wow. Is it really **that** simple to fix ??? Hmmm... Investigating...
Looks like a one-liner to me...
Comment 12 Daniel Glazman (:glazou) 2004-08-25 01:44:13 PDT
Yay!!! Fix pending.
mkaply: I presume you won't shout too loud if I take the bug ?-)
Comment 13 Mike Kaply [:mkaply] 2004-08-25 05:10:46 PDT
glazman: fixing this bug and hopefully the meta refresh bug in the process would
definitely cause an IBM Mozilla t shirt to be sent your way.
Comment 14 Daniel Glazman (:glazou) 2004-08-25 05:47:46 PDT
mkaply: I saw it on aaronlev just an hour ago. Get ready to go to the PostOffice:-)
Comment 15 Mike Kaply [:mkaply] 2004-08-26 10:38:40 PDT
Created attachment 157075 [details] [diff] [review]
Fix for problem

from glazou
Comment 16 Mike Kaply [:mkaply] 2004-08-26 10:44:19 PDT
OK, so with just this fix, clicking on links products blank pages until you
reload. So there is something missing here.
Comment 17 Johnny Stenback (:jst, jst@mozilla.com) 2004-08-26 10:45:45 PDT
Wow, that seems too simple to be true :-)

Does this fix this problem when midas is used in an [i]frame etc too?
Comment 18 Daniel Glazman (:glazou) 2004-08-26 11:20:14 PDT
mkaply: I told you on IRC there was something else. See the modifs on
nsHTMLDocument::SetDesignMode and nsEditingSession::EndDocumentLoad

jst: it was that simple... MakeWindowEditable() on the editorDocShell was creating
the editor but was letting mMakeWindowEditable true, so when the editingSession got
a delayed request for creating *again* an editor after each document onload...
The fix only has checks to reset the boolean as soon as the request is consumed and
check if the docShell is already editable or not. And if it is, reuse the editor.
Done... As I told mkaply on IRC, I just came with a fresh eye.
Comment 19 Daniel Glazman (:glazou) 2004-08-26 11:22:48 PDT
uuuh, sorry for the lame engish, I am exhausted and about to take a nap. I hope it
was understandable.
Comment 20 Johnny Stenback (:jst, jst@mozilla.com) 2004-08-26 11:24:00 PDT
Ok, that's cool. I'm glad to see there's an easier fix for this than what I came
up with way back when...

Oh, one more thing that came to mind, does JS get re-enabled when loading a new
page with this change too?
Comment 21 Daniel Glazman (:glazou) 2004-08-26 11:33:55 PDT
jst: excellent question... I am not at the office right now and not in position
to try; mkaply, can you test if you build with my patch for bug 237964 ?
/me goes to zzzZZzzz now
Comment 22 Mike Kaply [:mkaply] 2004-08-26 11:43:23 PDT
glazman:

I'll try your entire patch.

I'm trying to put together a patch that just fixes the designMode issue that I
can put in 1.7/aviary. I'm not sure we want contenteditable for aviary/1.7.
Comment 23 Hish 2004-08-28 08:48:30 PDT
(In reply to comment #22)
> I'm not sure we want contenteditable for aviary/1.7.

Why?
Comment 24 Hish 2004-08-29 01:47:03 PDT
btw: when in designmode onclick events still used to work. I guess they should
be disabled as well, right?
Comment 25 Mike Kaply [:mkaply] 2004-08-30 05:58:55 PDT
(In reply to comment #23)
> (In reply to comment #22)
> > I'm not sure we want contenteditable for aviary/1.7.
> 
> Why?

It's a large functional patch that has the potential to destabilize.
Comment 26 Daniel Glazman (:glazou) 2004-08-30 06:03:50 PDT
(In reply to comment #23)
> (In reply to comment #22)
> > I'm not sure we want contenteditable for aviary/1.7.
> 
> Why?

Because the number of potential side-effects is high, the number of things to
test to make sure there's no side-effect is high too, because it's won't reach
the stability level required for that.
Comment 27 Ben Goodger (use ben at mozilla dot org for email) 2004-09-27 21:58:03 PDT
This only affects the root document it seems... if people use IFRAMEs for the
documents then there is no problem. => not a blocker. 
Comment 28 Mike Kaply [:mkaply] 2005-01-04 08:56:08 PST
glazou: I still have a very cool IBM Mozilla t shirt waiting for you if we can
get a good fix for this :)
Comment 29 David Baron :dbaron: ⌚️UTC-10 2005-02-17 11:44:56 PST
Too late for 1.8b1, but I think we should fix this for b2.
Comment 30 Johnny Stenback (:jst, jst@mozilla.com) 2005-02-18 22:22:14 PST
This appears to be fixed by my proposed fix for bug 209020.
Comment 31 Johnny Stenback (:jst, jst@mozilla.com) 2005-02-23 13:31:04 PST
Fixed as a result of the fix for bug 209020.
Comment 32 José Jeria 2005-03-12 01:27:35 PST
*** Bug 285801 has been marked as a duplicate of this bug. ***
Comment 33 José Jeria 2005-07-12 12:57:41 PDT
*** Bug 300360 has been marked as a duplicate of this bug. ***
Comment 34 Bob Clary [:bc:] 2005-07-16 11:45:12 PDT
*** Bug 301019 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.