Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » General Web Development Discussions

Discuss general web development related issues. For Opera bugs, use the Bug Report Wizard: https://bugs.opera.com/wizard/. For Opera feature requests and queries, use Desktop wish-list: http://my.opera.com/community/forums/forum.dml?id=24.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By orblog anchor Tuesday, 23. June 2009, 07:43:10

avatar

Stopping javascript events (Opera Desktop)

As far as I know, Opera doesn't allow you to stop certain JS events. For example, the enter key.

I can work around this fact, and although the workarounds are not as good as being able to stop it, they work fairly well. However, other browsers that support it will be better off using the version that prevents them, so I can't use the workaround for all browser. So, I need to write two different versions of the code so I can have decent support for Opera, but not compromise the other browsers.

This brings me to my question, is there any way in Opera to detect if the event will be stopped or not? Checking the event information on Opera's Dragonfly debugger seems to indicate that it accepted the event stop, and it will be stopped. But in reality it isn't stopped.

This has left me with only one option: browser detection. Yes, it is a bad option. Which is why I'm here, looking for an alternative. Any thoughts? I'd settle for a way to detect if the event will be stopped. The only other way out I see is to just not care if Opera works or not.

What I'm working on is a web based rich text editor written in javascript, and it has special handling for the enter key in most situations. There are other events that have the same problem, but the enter key is the biggest.

By tot2ivn anchor Saturday, 24. October 2009, 04:45:37

avatarCurrently, Opera doesn't support stopping events. This is frustrating. Any Opera dev. out there can help us out ?

Thanks,

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom