зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1333008 - Don't toggle play or pause when button is focused. r=jaws
MozReview-Commit-ID: 2tyQUOOMQgH --HG-- extra : rebase_source : 28057a03f67f6a0714b90215f142d2692185afa4
This commit is contained in:
Родитель
1338dd1674
Коммит
7506c4daa4
|
@ -373,10 +373,28 @@ function runTest(event) {
|
|||
is(video.volume, 0.5, "Volume should be decreased by 0.1");
|
||||
SimpleTest.executeSoon(function() {
|
||||
isVolumeSliderShowingCorrectVolume(video.volume);
|
||||
synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
|
||||
});
|
||||
break;
|
||||
|
||||
case 27:
|
||||
is(event.type, "play", "checking event type");
|
||||
|
||||
SimpleTest.executeSoon(() => {
|
||||
synthesizeKey(" ", {});
|
||||
});
|
||||
break;
|
||||
|
||||
case 28:
|
||||
is(event.type, "pause", "checking event type");
|
||||
|
||||
SimpleTest.executeSoon(() => {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
throw "unexpected test #" + testnum + " w/ event " + event.type;
|
||||
}
|
||||
|
|
|
@ -1353,6 +1353,11 @@
|
|||
try {
|
||||
switch (keystroke) {
|
||||
case "space": /* Play */
|
||||
let target = event.originalTarget;
|
||||
if (target.localName === "button" && !target.disabled) {
|
||||
break;
|
||||
}
|
||||
|
||||
this.togglePause();
|
||||
break;
|
||||
case "downArrow": /* Volume decrease */
|
||||
|
|
Загрузка…
Ссылка в новой задаче