Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4918 closed defect (fixed)

dijit.form.Textarea tries to access window.frameElement properties even when it is null

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.0
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

There is a script in dijit.form.Textarea which attempts to grab the window.frameElement.postCreate function and execute it. It however does not work when window.frameElement does not have any properties or is null.

I am not sure if this is a Textarea bug specifically that causes frameElement to be null, but it only happens after I destroy a previous Textarea, and possibly after I destroy a dijit.Tree (not completely sure whether it is relevant though. The first creation of a Textarea is fine, it just falls over when I try to create one later in the applications life.

I made a simple patch to do a sanity check on window.frameElement so that it does not fail, as there is already a lower level check so it seems to be an optional action.

Attaching a patch against dijit trunk svn as at revision 11169.

Attachments (2)

fixWindowFrameElement.diff (1.4 KB) - added by guest 12 years ago.
patch for Textarea.js
test_textAreaConstruction.html (2.2 KB) - added by guest 12 years ago.
test case

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by guest

Attachment: fixWindowFrameElement.diff added

patch for Textarea.js

comment:1 Changed 12 years ago by bill

Owner: set to Douglas Hays

Would feel a lot better with a testcase for this (attached using the "attach file" button)

comment:2 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [11178]) Fixes #4918. Check for window.frameElement in iframe init.

comment:3 Changed 12 years ago by bill

Resolution: fixed
Status: closedreopened

On FF2 mac (and probably windows) this causes a syntax error on load of themeTester.html or test_textarea.html.

comment:4 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

(In [11196]) Fixes #4918. Corrected syntax error.

Changed 12 years ago by guest

test case

comment:5 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.