Ticket #1485304 (closed Bugs: fixed)

Opened 3 months ago

Last modified 4 weeks ago

Signature JS error: dom is null or not an object

Reported by: corradofiore Owned by:
Priority: 5 Milestone: 0.2-stable
Component: User Interface Version: svn-trunk
Severity: major Keywords: js javascript error dom null object ie7
Cc: dennis@…

Description

Under IE7 with signature and HTML composition enabled, IE7 reports a JS error:

line: 2028 charachter: 9 error: 'dom' is null or not an object

Also, no signature gets added to the message.

Attachments

ie7_js_error_dom_is_null.png (81.9 kB) - added by corradofiore 3 months ago.
Screenshot of JS error under IE7 (adding signature)
ie_signature.2.patch (1.7 kB) - added by tensor1982 3 months ago.
ie_signature.patch (1.7 kB) - added by tensor1982 3 months ago.
ie_html_signature_no_call_init.patch (2.6 kB) - added by tensor1982 3 months ago.
tested without call_init() on IE 7, Opera 9.52 and FF 3.0.1
opera_printing.patch (497 bytes) - added by tensor 2 months ago.
interim solution for Opera printing without call_init

Change History

Changed 3 months ago by corradofiore

Screenshot of JS error under IE7 (adding signature)

Changed 3 months ago by alec

  • status changed from new to closed
  • resolution set to worksforme

Works for me, please verify with r1693.

Changed 3 months ago by corradofiore

Hi, I tried r1711 and found the following results:

1. On IE version 7.0.6.6001.18000IC under Windows Vista works fine - no errors;

2. On a slightly earlier release of IE (7.0.6000.16711) under Windows Vista the same JS error still occurs;

I will try on a PC with Windows XP and let you know.

Changed 3 months ago by corradofiore

Also occurs on IE version 7.0.5730.13 under Windows XP. Using Microsoft JS debugger, I could see which line triggers the error:

-- on /program/js/app.js line 2076:

// Append the signature as a div within the body var sigElem = editor.dom.get("_rc_sig");

Changed 3 months ago by alec

  • status changed from closed to reopened
  • resolution deleted
  • component changed from Client Scripts to User Interface

Bug confirmed. Editor is not initialized when change_identity() from init_messageform(). So, JS error occurs and signature is not added.

Changed 3 months ago by tensor1982

Works perfectly in FF 3.0.1 and Opera 9.52. Does not work in IE7.

Windows XP SP3, fully patched.

Changed 3 months ago by tensor1982

This bug is very subtle. I stepped through JS code in Visual Studio 2005 several times. On one occasion, the signature appeared, very weird.

Changed 3 months ago by tensor1982

Found the root cause of the problem. Variable editor for "compose-body" is not initialized because tinyMCE postpones its real initialization on Windows (and webkit based browsers). To fix this bug tinyMCE must be patched to provide callback when tinyMCE really transfors textareas into editor objects.

Changed 3 months ago by tensor1982

There is a callback for individual editors! See the patch, this should fix the problem.

In the light of editor callbacks, is it possible to get rid of call_init()? It introduces a noticable delay...

Changed 3 months ago by tensor1982

Changed 3 months ago by tensor1982

Changed 3 months ago by tensor1982

tested without call_init() on IE 7, Opera 9.52 and FF 3.0.1

Changed 2 months ago by tensor

  • cc dennis@… added

My patch (ie_html_signature_no_call_init.patch) breaks printing in Opera because call_init() is stipped of and init() is called directly. window.print() does not work in opera until .onload is fired.

The proposed change is to signal to app object that two phases have been done:

  1. DOM is available
  2. Images have loaded (onload fired).

Changed 2 months ago by tensor

interim solution for Opera printing without call_init

Changed 5 weeks ago by rosali

* bump - anybody on that?

Changed 4 weeks ago by alec

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in r2030. Patch's part for call_init not applied because it was causing many new issues. If you still want to get rid of call_init prepare better patch and open new ticket.

Note: See TracTickets for help on using tickets.