开发者

jQuery Dialog blocks Firefox hotkeys

开发者 https://www.devze.com 2022-12-26 12:53 出处:网络
I\'m currently working开发者_StackOverflow中文版 with jQuery 1.4.2 and jQuery UI 1.8.2. I\'m experiencing some weird behavior after I have closed a modal dialog.

I'm currently working开发者_StackOverflow中文版 with jQuery 1.4.2 and jQuery UI 1.8.2.

I'm experiencing some weird behavior after I have closed a modal dialog. When I try to reload the page with Ctrl+F5 nothing happens. Another weird thing is that the context menu of Firefox can only be opened with right clicking twice.

The Firebug console is showing me the following message when I press the Ctrl key: The ‘charCode’ property of a keydown-event should not be used. The value is meaningless.

Demo page: http://testing.allinonesoftware.com/jquery/index.php

Luke


This is the intended behavior...however there is a browser difference here. Firefox is not focusing inside your dialog on open.

If you click outside the modal and try F5 in any other browser, same effect, no refresh.
Also, if you click inside the modal with Firefox, your F5 will work.

To make this behavior consistent across browsers, focus the element you're making the dialog on open, or if you want, focus one of the buttons...either will have the same effect, as long as the keypress goes inside the dialog.

For the error message:

The ‘charCode’ property of a keydown-event should not be used. The value is meaningless.

This is just how jQuery does some things, you can ignore it...it has no impact on your current issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消