Closed Bug 302885 Opened 19 years ago Closed 19 years ago

Can't type into rich text editor, designMode not working anymore

Categories

(Core :: DOM: Editor, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: roc, Assigned: jst)

References

()

Details

(Keywords: fixed1.8, regression)

Attachments

(1 file)

In today's trunk build, I can't type into the rich text editor in Gmail. I can't
even get the caret to appear.

Here's a similar report:
http://forums.mozillazine.org/viewtopic.php?t=299800
Assignee: mozeditor → nobody
I see the same. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4)
Gecko/20050731 Firefox/1.0+ ID:2005073122
Regression between ID:2005073013 and ID:2005073111.
Probably fallout from bug 296639.
Blocks: splitwindows
Keywords: regression
Flags: blocking1.8b4?
In fact, designmode is not working at all anymore. I get this is in the js console:
Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
javascript:void(document.designMode='on') :: <TOP_LEVEL> :: line 1"  data: no]
Summary: Can't type into rich text editor → Can't type into rich text editor, designMode not working anymore
Whiteboard: javascript:void(document.designMode='on')
All/All since it hits Macs.  Shouldn't this at least be "major", too? :-)

The error message from Blogger is slightly different, if it matters, see bug 302934.
Severity: normal → major
OS: Linux → All
Hardware: PC → All
*** Bug 302934 has been marked as a duplicate of this bug. ***
I bet the problem here is the code that does:

299     // if a target window is specified, it must be the window we expect
300     if (aTargetWindow != mWindow)
301         return NS_ERROR_FAILURE;

in nsCommandManager::GetControllerForCommand.  mWindow is almost certainly the
outer, since this is the docshell's command manager.  Midas is passing it the
inner window as aTargetWindow.  I'd say that Midas should pass the outer window.
 In general, I would say that any interface call that is not specified otherwise
wants the outer window...

Perhaps we should make GetScriptGlobalObject return the outer window and
introduce a new accessor (GetInnerScriptGlobalObject() or something) to return
the inner?  Or maybe add another accessor for the outer and move most consumers
off GetScriptGlobalObject()?
Assignee: nobody → jst
*** Bug 303014 has been marked as a duplicate of this bug. ***
Flags: blocking1.8b4? → blocking1.8b4+
[url=https://bugzilla.mozilla.org/show_bug.cgi?id=302928]bug:302928[/url]:what
about this problem?
I am having trouble replying to www.mail2web.com mail as well. Yahoo mail seems
to work fine. Hope this helps somehow.
requesting as 1.5 blocker, since composing pages in gmail or blocker become
unusable.
Flags: blocking-aviary1.5?
blocking 1.8b4 *is* blocking 1.5
Flags: blocking-aviary1.5?
*** Bug 303342 has been marked as a duplicate of this bug. ***
*** Bug 303499 has been marked as a duplicate of this bug. ***
*** Bug 303535 has been marked as a duplicate of this bug. ***
http://goldismoney.info/forums/


Confirmed... cannot reply to or post topics in the gold is money forums, which
uses a similar type of text editor.
*** Bug 303867 has been marked as a duplicate of this bug. ***
Can we have <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=302928"
title="UNCONFIRMED - Can't post on the forum of vBulletin (2005.07.31 - Deer
Park Alpha 2)">bug 302928</a> marked as a dupe of this one?
*** Bug 302928 has been marked as a duplicate of this bug. ***
*** Bug 303874 has been marked as a duplicate of this bug. ***
*** Bug 304009 has been marked as a duplicate of this bug. ***
javascript:void(document.designMode='on')

I'm pretty sure this belonges in the "URL" field, not in "Status Whiteboard".
Whiteboard: javascript:void(document.designMode='on')
FYI, I've got a fix for this in my tree, needs some cleaning up. The fix will go
in as cleanup and fixes for problems found in bz's review for bug 296639.
I've got a fix for this that'll probably go in as a followup change to bug 296639.
Fixed with the last checkin for bug 296639.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 304393 has been marked as a duplicate of this bug. ***
This bug also affect the Rich Text Editor on the Microsoft MSDN forums
(forums.microsoft.com)

Seems to work on the page where I had problems.&#13;&#10;I am still seeing a Javascript editor, even though I can type into the rich text&#13;&#10;editor.&#13;&#10;&#13;&#10;Error: [Exception... "Component returned failure code: 0x80004003&#13;&#10;(NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLDocument.queryCommandState]"  nsresult:&#13;&#10;"0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame ::&#13;&#10;http://www.ultimatesubaru.net/forum/clientscript/vbulletin_wysiwyg.js ::&#13;&#10;set_context :: line 440"  data: no]&#13;&#10;Source File: http://www.ultimatesubaru.net/forum/clientscript/vbulletin_wysiwyg.js&#13;&#10;Line: 440
Oh wow, that comment had some messed up newlines in it... How'd that happen?

Anyways, can you point me to the edit box that isn't working?
*** Bug 288747 has been marked as a duplicate of this bug. ***
Verified FIXED using build 2005-08-17-16 on http://www.gmail.com, 4 samples
linked off of http://www.fckeditor.net/demo/default.html, and finally
http://forums.microsoft.com/msdn/AddPost.aspx?ForumID=31 with SeaMonkey trunk on
Windows XP.
Status: RESOLVED → VERIFIED
(In reply to comment #4)
> In fact, designmode is not working at all anymore. I get this is in the js
console:
> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]"  nsresult:
> "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
> javascript:void(document.designMode='on') :: <TOP_LEVEL> :: line 1"  data: no]


The W3C standard says - You cannot set the document.designMode="on" for the
current document. Always have an iframe set for it, which would be :
document.getElementById("myIframe").contentDocument.designMode="on"; or
document.getElementById("edit").contentDocument.designMode="on";

IE might work differently, but all Gecko based browsers are strictly W3C
Standards and we ppl must be proud about it :)

Best Regards
Neo
(In reply to comment #33)
> The W3C standard says...
You didn't get the point because you also can't turn off designMode for that iframe.
> The W3C standard says

designMode is not part of any W3C standard.
(In reply to comment #35)
> > The W3C standard says
> designMode is not part of any W3C standard.

Oops, you are right, I was under the image that Mozilla follows W3C Standards 
but now i have realised that it also supports non-w3c standards in which 
designMode and innerHTML falls.

And YES! We cannot put off the designMode to off once started.. hmm, thats 
really a BUG!!

[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title>IFRAME designMode On/Off</title>
  <script>
  function putOn(){
    document.getElementById("ifr").contentDocument.designMode="on";
  }
  
  function putOff(){
    document.getElementById("ifr").contentDocument.designMode="off";
  }
  
  </script>
  </head>
  <body>
  <input type=button value="On" onclick="putOn();">
  <input type=button value="Off" onclick="putOff();">
    <iframe id="ifr" width="95%" height="95%" src="" />
  </body>
</html>
[/code]

When i click on the On button it works fine. But then when Off was clicked FF 
did not respond and did not raise an error too. WEIRD!! :(

(In reply to comment #36)
> And YES! We cannot put off the designMode to off once started.. hmm, thats 
> really a BUG!!

WFM using latest branch build on XP.
Fixed on the trunk before we branched for 1.8.
Keywords: fixed1.8
Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
-> latest stable Mozilla Firefox now

When I try to set designMode ON to an IFrame, which is in the HIDDEN DIV, it causes an EXCEPTION.

Follows example HTML: (do not forget to set iframe src to file in same directory)

<html>
	<head>
	<title>Exception when try to DESIGNMODE ON when DIV HIDDEN</title>
	<script>
	function putOn(){
		document.getElementById("ifr").contentDocument.designMode="on";
	}
	function putOff(){
		document.getElementById("ifr").contentDocument.designMode="off";
	}
	function divOn() {
		document.getElementById("mydiv").style.display = "";
	}
	function divOff() {
		document.getElementById("mydiv").style.display = "none";
	}
	</script>
	</head>
	<body>
		<input type=button value="DIV show" onclick="divOn();">
		<input type=button value="DIV hide" onclick="divOff();">
		<input type=button value="DESIGNMODE on" onclick="putOn();">
		<input type=button value="DESIGNMODE off" onclick="putOff();">
		<hr />
		<div id="mydiv">
			<iframe src="document_in_same_directory.html" name="ifr" id="ifr" width="50%" height="50%"></iframe>
		</div>
	</body>
</html>
(In reply to comment #39)
Michal, I think that's bug 263392.
You need to log in before you can comment on or make changes to this bug.