Closed Bug 241182 Opened 16 years ago Closed 2 years ago

plain text editor - doCommand cmd_insertText not working when supportsCommand cmd_insertText returns true

Categories

(Core :: DOM: Editor, defect)

x86
Windows 2000
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1220696

People

(Reporter: martijn.martijn, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040323 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040323 Firefox/0.8.0+

I've asked it here before:
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=Qzybc.11361%24Y22.123711%40zonnet-reader-1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26group%3Dnetscape.public.mozilla.qa.editor

This returns true to me:
textarea.controllers.getControllerForCommand('cmd_insertText').supportsCommand("cmd_insertText");

But when I try to use it:
textarea.controllers.getControllerForCommand('cmd_insertText').doCommand('cmd_insertText','hallo');


I get an NS_ERROR_NOT_IMPLEMENTED back.

It seems like this is the source that's causing the trouble:
http://lxr.mozilla.org/seamonkey/source/editor/libeditor/base/nsEditorCommands.cpp#711



Reproducible: Always
Steps to Reproduce:
1. Tried to use doCommand('cmd_insertText','hallo');
2.
3.

Actual Results:  
I got an NS_ERROR_NOT_IMPLEMENTED back.
 

Expected Results:  
It should work (preferrably) or the supportsCommand("cmd_insertText") should
return false.
Click on the two buttons.
You should click yes on the security warning.
After clicking the first button, you get returned 'true'.
But after clicking the second button, you get an error in the javascript
console.
Keywords: testcase
The testcase needs to be downloaded and tested locally to see the bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: bugzilla → editor
Assignee: mozeditor → nobody
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1220696
You need to log in before you can comment on or make changes to this bug.