Hi Duke

dukejansen wrote:
Additional testing with FireBug reveals that the JavaScript engine is
reporting an error when the Escape or Enter key is hit:

document.getElementById("cancelLink9d7").click is not a function
http://.../resources/wicket.contrib.input.events.InputBehavior/shortcuts.js
Line 4

It seems like somehow that click function doesn't exist in Firefox...

Researching online a bit confirms this... for example:

http://quomon.com/question_simulation-click-html-anchor-javascript_2786.aspx

My guess is that the input-events package was written to work with buttons,
which have a click event, and not anchor tags, which don't, which means I'll
need to modify that code a bit to work with anchor tags...
I cant exactly remember what the scope where, just that it did support links at some point, in safari and IE. Patches are always welcome..

But looking in the source there are some auto hooking for links actually, which uses href instead of click AFAIR it should just pick it up automaticly...:

<script type="text/javascript">
function init${wicketComponentId}() {
   shortcut.add("${keys}",function() {
window.location=document.getElementById('${wicketComponentId}').href; },{
   'disable_in_input':${disable_in_input},
   'type':'${type}',
   'propagate':${propagate},
   'target':${target}
});
}
init${wicketComponentId}();
</script>

Did you check the examples, and see if they still are working, they do include a link aswell?

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples


dukejansen wrote:
Has anyone had any issues getting the wicket-contrib-input-events package
to work properly with Mozilla?

It seems to work great in IE, but somehow my events are not being picked
up in Firefox.

Specifically, let's say I have a link which launches a modal, and inside
that modal is a panel with an OK button and a Cancel button. I have set up
keyboard shortcuts so that Escape fires the Cancel onclick event and Enter
fires the OK onclick event.

This works great in IE, but in Firefox when I hit "Enter" it seems to
think I'm clicking the link that was originally clicked to launch the
modal - the link that presumably still has focus behind the modal mask.

I believe that Nino actually tested against FF2, so I was surprised by
this, and thought perhaps I'm seeing the result of some kind of
interaction with other JavaScript on the page.

Has anyone else run into this, and if so do you have any wisdom to share?

Thanks.

-Jason




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to