зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1623476 - Fix event targeting in a click_events_on_input.html. r=jgraham
Presumably, the intention of the test is to hit the middle of the target. To this end, the test specifies an offset of half the target's dimensions relative to the origin of the target. However, when pointerMove() is given an element as origin, it already uses the element's center as the origin point, so we end up actually targeting the bottom right pixel which is prone to rounding issues. Differential Revision: https://phabricator.services.mozilla.com/D67518 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c8a0ab983b
Коммит
bdd33701db
|
@ -37,10 +37,7 @@
|
|||
// Inject mouse click events.
|
||||
var actions = new test_driver.Actions();
|
||||
document.getElementById("other").focus();
|
||||
var bounds = target.getBoundingClientRect();
|
||||
actions.pointerMove(Math.floor(bounds.width / 5),
|
||||
Math.floor(bounds.height / 2),
|
||||
{origin: target})
|
||||
actions.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown({button: mouseButton})
|
||||
.pointerUp({button: mouseButton})
|
||||
.send()
|
||||
|
|
Загрузка…
Ссылка в новой задаче