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