mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-24 00:24:14 +00:00
Bug 819146 - Control/shift-enter in Metro urlbar is broken [r=ally]
This commit is contained in:
parent
c26d3bdb1d
commit
642db17538
@ -471,7 +471,8 @@
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="keypress" phase="capturing" keycode="VK_RETURN">
|
||||
<handler event="keypress" phase="capturing" keycode="VK_RETURN"
|
||||
modifiers="accel shift any">
|
||||
<![CDATA[
|
||||
if (this.popup.submitSelected())
|
||||
return;
|
||||
|
@ -154,6 +154,51 @@ gTests.push({
|
||||
}
|
||||
});
|
||||
|
||||
gTests.push({
|
||||
desc: "Control-Enter in urlbar",
|
||||
setUp: setUp,
|
||||
tearDown: tearDown,
|
||||
run: function () {
|
||||
sendElementTap(window, gEdit);
|
||||
ok(gEdit.isEditing, "focus urlbar: in editing mode");
|
||||
|
||||
EventUtils.sendString("example", window);
|
||||
EventUtils.synthesizeKey("VK_RETURN", { accelKey: true }, window);
|
||||
is(gEdit.value, "www.example.com", "Control-enter adds www. and .com");
|
||||
ok(!gEdit.isEditing, "hit enter in urlbar: not in editing mode");
|
||||
}
|
||||
});
|
||||
|
||||
gTests.push({
|
||||
desc: "Shift-Enter in urlbar",
|
||||
setUp: setUp,
|
||||
tearDown: tearDown,
|
||||
run: function () {
|
||||
sendElementTap(window, gEdit);
|
||||
ok(gEdit.isEditing, "focus urlbar: in editing mode");
|
||||
|
||||
EventUtils.sendString("example", window);
|
||||
EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true }, window);
|
||||
is(gEdit.value, "www.example.net", "Shift-enter adds www. and .net");
|
||||
ok(!gEdit.isEditing, "hit enter in urlbar: not in editing mode");
|
||||
}
|
||||
});
|
||||
|
||||
gTests.push({
|
||||
desc: "Control-Shift-Enter in urlbar",
|
||||
setUp: setUp,
|
||||
tearDown: tearDown,
|
||||
run: function () {
|
||||
sendElementTap(window, gEdit);
|
||||
ok(gEdit.isEditing, "focus urlbar: in editing mode");
|
||||
|
||||
EventUtils.sendString("example", window);
|
||||
EventUtils.synthesizeKey("VK_RETURN", { accelKey: true, shiftKey: true }, window);
|
||||
is(gEdit.value, "www.example.org", "Shift-enter adds www. and .org");
|
||||
ok(!gEdit.isEditing, "hit enter in urlbar: not in editing mode");
|
||||
}
|
||||
});
|
||||
|
||||
gTests.push({
|
||||
desc: "display and select a search with keyboard",
|
||||
setUp: setUp,
|
||||
|
Loading…
Reference in New Issue
Block a user