[MAGNOLIA-1085] deprecated js method warning when using firefox 2 Created: 27/Sep/06  Updated: 23/Jan/13  Resolved: 14/Nov/07

Status: Closed
Project: Magnolia
Component/s: activation
Affects Version/s: 3.0 RC2
Fix Version/s: 3.5 RC1

Type: Improvement Priority: Blocker
Reporter: Fabrizio Giustina Assignee: Vivian Steller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Firefox 2rc1 complains (in the error console) about the use of the nonstandard captureEvents() call in Magnolia code:
Warning: Use of captureEvents() is deprecated, see bug 330494

this reports a forward compatibility problem but, at the moment, it's just annoying to see all those logs in the console.

some more info gathered from firefox dev lists:

====

The supported events did not change, it's just that using the
non-standrard window.captureEvents method to listen for events will
break in the next version of Gecko (1.9 - the engine for Firefox 3).

You should use the W3C events API instead - specifically
addEventListener. There are quite a few documents and tutorials
explaining the W3C events system, read some of them (I like the
explanation and the illustration in the DOM Level 3 Events draft).

Even though W3C DOM Level 2 Events specification doesn't have a key
event module, Gecko supports the usual key events, 'keypress'
included.

Documentation is available on MDC
(http://developer.mozilla.org/en/docs/Gecko_DOM_Reference ), but some
of its pages are not of good enough quality yet, so be careful. Once
you figure something out, you're welcome to improve the docs. The W3C
specifications are a good source of information too, except for the
places where we don't follow the spec.

====



 Comments   
Comment by Magnolia International [ 10/Oct/07 ]

How do we reproduce this? Is it still happening with final versions of firefox ?

Comment by Fabrizio Giustina [ 10/Oct/07 ]

> How do we reproduce this? Is it still happening with final versions of firefox ?

yes, it definitively happens. Open the firefox error console at warning level and load the admin interface: you will see 6 identical warning popping up.
The warning says this will be broken in firefox 3, which is really near. We need to check it asap.

Comment by Magnolia International [ 10/Oct/07 ]

Hmm, indeed, in the "XML" tabs, which I'd never used before :-D
There are a couple of usages in admin-js/general.js, but more worrisome are the usages in fckeditor's code (but maybe they're surrounded by ie-only tests?)

Comment by Magnolia International [ 10/Oct/07 ]

Let's try to fix that for 3.1 then ... any suggestions ?

Comment by Vivian Steller [ 14/Nov/07 ]

Just dropped calls to captureEvents. They're not required for browsers post netscape 4, which we do not support for the adminInterface.

See:

Note that also fckEditor removed these calls in the version we currently deliver (2.4.3).

Generated at Mon Feb 12 03:23:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.