On 02/08/2012 11:48 AM, Fink, Andreas wrote:
> Hi all,
>
> we mentioned a ugly behavior of our app when someone set the cursor in a
> read-only text field an press the backspace key.
> The browser then loads the previous visited website. At least IE 9 is doing
> this this, it doesn't happen with Firefox. I've not tested other Browsers yet.
>
> I've implemented a workaround by adding a listener to the root:
>
> this.getRoot().addListener("keypress", function(e) {
> if (e.getKeyIdentifier() === "Backspace") {
> e.stop();
> }
> }, this);
Why didn't you set the listener on the text field? That would still
allow backspace navigation if the focus is elsewhere.
Also, you could use .preventDefault().
T.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel