зеркало из https://github.com/mozilla/gecko-dev.git
Bug 405095 - "datetimepicker suppresses most keyboard shortcuts" [p=ynvich@gmail.com (Sergey Yanovich) r=gavin r=Enn a1.9b3=beltzner]
This commit is contained in:
Родитель
1a53e57ea9
Коммит
2b834b8dd9
|
@ -18,6 +18,12 @@
|
|||
<datepicker id="datepicker-grid" type="grid"/>
|
||||
</hbox>
|
||||
|
||||
<keyset id="mainKeyset">
|
||||
<key id="key_alt_q" key="Q" oncommand="return" modifiers="alt"/>
|
||||
<key id="key_ctrl_q" key="Q" oncommand="return" modifiers="control"/>
|
||||
<key id="key_meta_e" key="E" oncommand="return" modifiers="meta"/>
|
||||
</keyset>
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
@ -182,6 +188,10 @@ function testtag_datepicker_UI_fields(dp, testid)
|
|||
testtag_datepicker_UI_key(dp, testid, "2003-02-28", dp.dateField, 2003, 1, 1, 2003, 1, 28);
|
||||
testtag_datepicker_UI_key(dp, testid, "2004-02-28", dp.dateField, 2004, 1, 29, 2004, 1, 28);
|
||||
testtag_datepicker_UI_key(dp, testid, "2100-02-28", dp.dateField, 2100, 1, 1, 2100, 1, 28);
|
||||
|
||||
synthesizeKeyExpectEvent('Q', { altKey: true }, $("key_alt_q"), "command", testid + " alt shortcut");
|
||||
synthesizeKeyExpectEvent('Q', { ctrlKey: true }, $("key_ctrl_q"), "command", testid + " ctrl shortcut");
|
||||
synthesizeKeyExpectEvent('E', { metaKey: true }, $("key_meta_e"), "command", testid + " meta shortcut");
|
||||
}
|
||||
|
||||
function testtag_datepicker_UI_grid(dp, type, testid)
|
||||
|
|
|
@ -217,6 +217,7 @@
|
|||
<![CDATA[
|
||||
if (this._hasEntry && event.charCode &&
|
||||
this._currentField != this._fieldAMPM &&
|
||||
! (event.altKey || event.ctrlKey || event.metaKey) &&
|
||||
(event.charCode < 48 || event.charCode > 57))
|
||||
event.preventDefault();
|
||||
]]>
|
||||
|
|
Загрузка…
Ссылка в новой задаче