зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1357206 followup: fix the Windows key issues in devtools tests and reenable the new behavior.
This commit is contained in:
Родитель
82005900e6
Коммит
be4450a996
|
@ -553,7 +553,17 @@ function invokeInTab(fnc) {
|
|||
}
|
||||
|
||||
const isLinux = Services.appinfo.OS === "Linux";
|
||||
const isMac = Services.appinfo.OS === "Darwin";
|
||||
const cmdOrCtrl = isLinux ? { ctrlKey: true } : { metaKey: true };
|
||||
// On Mac, going to beginning/end only works with meta+left/right. On
|
||||
// Windows, it only works with home/end. On Linux, apparently, either
|
||||
// ctrl+left/right or home/end work.
|
||||
const endKey = isMac ?
|
||||
{ code: "VK_RIGHT", modifiers: cmdOrCtrl } :
|
||||
{ code: "VK_END" };
|
||||
const startKey = isMac ?
|
||||
{ code: "VK_LEFT", modifiers: cmdOrCtrl } :
|
||||
{ code: "VK_HOME" };
|
||||
const keyMappings = {
|
||||
sourceSearch: { code: "p", modifiers: cmdOrCtrl },
|
||||
fileSearch: { code: "f", modifiers: cmdOrCtrl },
|
||||
|
@ -562,8 +572,8 @@ const keyMappings = {
|
|||
Down: { code: "VK_DOWN" },
|
||||
Right: { code: "VK_RIGHT" },
|
||||
Left: { code: "VK_LEFT" },
|
||||
End: { code: "VK_RIGHT", modifiers: cmdOrCtrl },
|
||||
Start: { code: "VK_LEFT", modifiers: cmdOrCtrl },
|
||||
End: endKey,
|
||||
Start: startKey,
|
||||
Tab: { code: "VK_TAB" },
|
||||
Escape: { code: "VK_ESCAPE" },
|
||||
pauseKey: { code: "VK_F8" },
|
||||
|
|
|
@ -1253,7 +1253,7 @@ pref("dom.input.dirpicker", false);
|
|||
|
||||
// Enable not moving the cursor to end when a text input or textarea has .value
|
||||
// set to the value it already has. By default, enabled.
|
||||
pref("dom.input.skip_cursor_move_for_same_value_set", false);
|
||||
pref("dom.input.skip_cursor_move_for_same_value_set", true);
|
||||
|
||||
// Enables system messages and activities
|
||||
pref("dom.sysmsg.enabled", false);
|
||||
|
|
Загрузка…
Ссылка в новой задаче