Opened 7 years ago

Closed 7 years ago

#15031 closed defect (fixed)

Error "_4ba is undefined" in FF with dojox plugin and dijit/form/Form

Reported by: Jovanovic Owned by: bill
Priority: undecided Milestone: 1.8
Component: Editor Version: 1.7.2
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

Error "_4ba is undefined" in mozilla Firefox appear when dijit.Editor with plugin dojox/editor/plugins/InsertAnchor are contained in dijit/form/Form widget

test code :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Tett</title>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<script>
    dojoConfig= {
        has: {
            "dojo-firebug": true
        },
        parseOnLoad: true,
		isDebug: true,
        async:true
    };
</script>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" type="text/javascript"></script>

<style type='text/css'>
@import 'http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dijit/themes/claro/claro.css';
</style>
</head>

<body class="claro">
<b>Toggle the View Source button to see the contents in source mode.</b>
<br>
<form method="post" data-dojo-type="dijit.form.Form">
<div data-dojo-type="dijit.Editor" id="editor"
 data-dojo-props="plugins:
					['InsertAnchor']">
</div>
</form>
</body>

</html>
<script>
require([
	"dijit/form/Form",
    "dijit/Editor",
	"dojox/editor/plugins/InsertAnchor"
]);
</script>

Attachments (2)

test2.html (1.1 KB) - added by Jovanovic 7 years ago.
editor.html (1004 bytes) - added by bill 7 years ago.
slightly simplified test case, still fails

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Jovanovic

Attachment: test2.html added

comment:1 Changed 7 years ago by bill

Component: DijitEditor
Status: newopen

I reproduced on FF/mac against the 1.7 branch, although not on trunk, apparently failing in _postDomFilter() because ed.window is undefined.

Changed 7 years ago by bill

Attachment: editor.html added

slightly simplified test case, still fails

comment:2 Changed 7 years ago by Jovanovic

You don't reproduce in the futur version ?

comment:3 Changed 7 years ago by bill

Cc: Douglas Hays added

That's what I meant, but now it's reproducing for me on trunk too. It's a race condition so it depends on network speed etc., hence the differing results before.

The issue is that dijit.form.Form is calling Editor.get("value") before the editor's iframe has finished loading, In your test case that causes InsertAnchor._postDomFilter() to execute, which depends on the editor being fully initialized. I'll try a fix like [28187] to work around it.

comment:4 Changed 7 years ago by bill

Milestone: tbd1.8
Owner: set to bill
Status: openassigned

comment:5 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [28188]:

Avoid error in InsertAnchor plugin when Editor.get("value") called before editor's iframe initialized.

Also removing apparently unnecessary withGlobal() call: since we already have a pointer to the node, dojo.query() knows what the document for that node is.

Fixes #15031 !strict.

Note: See TracTickets for help on using tickets.