Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7200 closed defect (fixed)

dijit._editor.plugins.FontChoice has issue with queryCommandValue call in FireFox 3

Reported by: jgarfield Owned by: liucougar
Priority: high Milestone: 1.2
Component: Editor Version: 1.1.0
Keywords: editor, fontchoice, ff3, NE_ERROR_FAILURE Cc: jgarfield@…
Blocked By: Blocking:

Description

I haven't had much time to fully test this one in-depth, but when loading up an Editor in FireFox? 3 with the FontChoice? plugin loaded, you get the following error...

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.queryCommandEnabled]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/td/js/dojo-release-1.1.0/dojo/dojo.js :: anonymous :: line 1140" data: no]

I believe this is similar to the issue reported in Defect #6729. I added the same try { } catch { } around the call in the FontChoice? plugin, and it worked fine after that.

Change History (6)

comment:1 Changed 11 years ago by bill

Hmm, this doesn't happen for me in test_Editor.html, does it happen for you?

comment:2 in reply to:  1 Changed 11 years ago by jgarfield

Replying to bill:

Hmm, this doesn't happen for me in test_Editor.html, does it happen for you?

I'm not getting the error in test_Editor.html (from the archive.dojotoolkit.org/nightly tests), however, I notice that all of the Editors on that page which contain this plugin are not programmatically created.

In my situation I'm creating an array of the plugins and then passing them to the constructor while create a new editor in code...

var plugins = [
	{
		name: 'dijit._editor.plugins.FontChoice',
		command: 'fontName',
		custom:["Arial", "Arial Black", "Comic Sans MS", "Courier New", "Lucida Console", "Tahoma", "Times New Roman", "Trebuchet MS", "Verdana"]
	},
    	"fontSize", "|",
	"bold","italic","underline","|",
	"foreColor","hiliteColor","|",
	"justifyLeft","justifyCenter","justifyRight","|",
	"indent","outdent","insertUnorderedList","insertOrderedList"
];

var editor = new dijit.Editor({ plugins: plugins }, nodeToReplace);

Hope that might help?

comment:3 Changed 11 years ago by bill

The thing is that [13687] modified the FontChoice plugin to do this already. Does your code differ from trunk?

comment:4 Changed 11 years ago by jgarfield

Ah, good catch Bill. I'm not sure why my local copy didn't get updated properly, but I definitely didn't have that in my trunk copy. Sorry about that!

Go ahead and close this sucker out! :)

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

comment:6 Changed 11 years ago by bill

Milestone: tbd1.2
Note: See TracTickets for help on using tickets.