[Pmwiki-users] thanks scott... one more for you all

Patrick R. Michaud pmichaud at pobox.com
Fri May 9 16:18:01 CDT 2003


On Wed, May 07, 2003 at 12:50:13PM -0500, Davis, James C. wrote:
> > Why is it when you hit Esc it runs the Reset button?	
> 
> This was annoying me too so I have come up with a way to get IE to 
> not reset a form when you press escape. 

This is excellent, James--thanks!  I think I found a shorter way to
disable escape=reset but I need to have it tested on different browsers
before I can add it to PmWiki.  I've set up a test page at

   http://www.pmichaud.com/wiki/Development/FixEscapeKey

You can go to this page, hit "Edit Page", type in some text,
then press the <Escape> key and see if it reverts back to the original
text.  If it does, then the escape key wasn't disabled properly.  If
your changes stay in the text box, then the fix works for your 
particular browser.

Note that I have the escape disabled only on that one page--if you
edit any other pages on pmichaud.com and hit the escape key it still does
the same brain-dead thing it used to--i.e., reset the text box to its 
original value.

If all of this discussion about escape keys doesn't make any sense to
you, then it probably hasn't been an issue with whatever browser you're 
using.  But for those people who use Internet Explorer, it's a big annoyance
that we'd really like to fix.

If I get enough indications that the fix I made works, then I'll add
it to the next release of PmWiki.

Pm


P.S.:  
  For those who want the technical details, I simply added
	onKeyDown='if (event.keyCode==27) event.returnValue=false;'
  as an attribute to the <textarea ...> tag in the edit form.





More information about the pmwiki-users mailing list