Tags:
create new tag
view all tags
As a 'vi' user, I often try to press the ESC key, and this also happens in TWiki.

My problem is, that IE 5.5 undoes all changes I've written in the TWiki editor (textarea). The Netscape 4.7x doesn't have this problem, the ESC key is ignored.

Question: How to suppress the ESC key events in IE ? Is there a setting for the textarea?

-- StefanScherer - 11 Jan 2001

Answer: I've added the following event handler (the bold text) in the edit.tmpl to suppress the ESC key:

 <TEXTAREA name="text" onKeydown="if (window.event.keyCode == 27)
    {window.event.cancelBubble = true; return false;}" wrap="virtual"
     rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%">%TEXT%</TEXTAREA>

I've also added my edit.tmpl so it is easier to add this feature at the right position.

-- StefanScherer - 01 Feb 2001

Here's a workaround in case this patch is not applied, e.g. on TWiki.org - just type Ctrl/Z and the changes due to hitting ESC will be undone, i.e. you'll get your changes. YMMV, try this in a test environment first just in case!

-- RichardDonkin - 09 Feb 2002

We just had this case at work, with some editing lost because of it.

The proposed fix should be enhanced to be aware of IE. This is to reduce potential problems with other browsers.

-- PeterThoeny - 02 Sep 2003

The cancelbubble is not required. Simply onKeyDown="if(window.event.keyCode==27)return false;" and it works. Tested on IE, Konqueror, Opera and Gekko; fine on all. Note that OpenWiki also use this solution.

-- CrawfordCurrie - 27 Jul 2004

Thanks Crawford. Is now in SVN.

(Note: Please leave the ImplProgress field at 0%, it indicates the implementation progress accepted into the repository)

-- PeterThoeny - 27 Jul 2004

Then how do I indicate the coding is complete and it's ready for check in, which is the most frequent position I find myself in?

-- CrawfordCurrie - 28 Jul 2004

Good question. A PatchPropsal would assume 100% code ready. I see the need for two implementation progress indicators, one for "x% work done and ready" and one for "x% of implemented work in repository". So far we track the latter. (If there is a need, refactor this discussion)

-- PeterThoeny - 27 Jul 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formattmpl edit.tmpl   manage 2.8 K 2001-02-01 - 08:04 UnknownUser changed edit template
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2004-07-28 - PeterThoeny
 
  • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.