create new tag
, view all tags

Bug: Editing any topic gives error in JavaScript console

When in edit mode, any keystroke in the text box will display "Error: window.event has no properties" in the JavaScript Console if it is open.

Test case

Open the JavaScript Console. Clear the existing list. Edit any topic. Use any key and see error messages added to the JavaScript console.


TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, SpreadSheetPlugin, EditTablePlugin, ActionTrackerPlugin, AgilePlannerPlugin, CommentPlugin, ConditionalPlugin, EmptyPlugin, FormQueryPlugin, InterwikiPlugin, MacrosPlugin, ProjectPlannerPlugin, RenderListPlugin, RollupPlugin, SlideShowPlugin, SmiliesPlugin, SpacedWikiWordPlugin, TWikiDrawPlugin, TablePlugin, XpTrackerPlugin.
Server OS: RedHat Linux kernel 2.4.20-28.7smp
Web server: Apache
Perl version: 5.6.1
Client OS: MS Windows 2000 SP 4
Web Browser: Firefox 1.0

-- PeterWeatherdon - 20 Dec 2004

Follow up

Most people don't see this (you would have expected it to be reported before if they did) so it is probably some combination of the many plugins you have installed.

I would suggest you disable all plugins, try again, and if the error still occurs take careful note of the client configuration (browser, version etc) here.

If the error magically disappears, re-enable the plugins one by one until it reappears. Then report the error against the plugin.

-- CrawfordCurrie - 20 Dec 2004

I tried disabling all plugins and the same symptoms occurred.

-- PeterWeatherdon - 31 Dec 2004

My Fix: Firefox (and I presume all Mozilla family browsers) does not recognize the window.event.keyCode property in the onkeydown event handler of the textarea form element in edit.tmpl (and the other skinned edit templates). This event handler is trying to override the default action in Internet Explorer of reverting to the original text when you hit the <Esc> key.

To fix this, replace the existing onkeydown string (if(window.event.keyCode==27) return false;) in the textarea tag (line 93 in my edit.tmpl) with

k=document.all?window.event.keyCode:event.which;return k!=27;
This works for Firefox and IE.

-- PeterWeatherdon - 02 Feb 2005

Fix record

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2005-02-02 - PeterWeatherdon
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.