refs #410 - click() mouse events ordering
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -421,7 +421,7 @@ Casper.prototype.clear = function clear() { | ... | @@ -421,7 +421,7 @@ Casper.prototype.clear = function clear() { |
421 | Casper.prototype.click = function click(selector) { | 421 | Casper.prototype.click = function click(selector) { |
422 | "use strict"; | 422 | "use strict"; |
423 | this.checkStarted(); | 423 | this.checkStarted(); |
424 | var success = this.mouseEvent('mousedown', selector); | 424 | var success = this.mouseEvent('mousedown', selector) && this.mouseEvent('mouseup', selector); |
425 | success = success && this.mouseEvent('click', selector); | 425 | success = success && this.mouseEvent('click', selector); |
426 | this.evaluate(function(selector) { | 426 | this.evaluate(function(selector) { |
427 | var element = __utils__.findOne(selector); | 427 | var element = __utils__.findOne(selector); |
... | @@ -429,7 +429,7 @@ Casper.prototype.click = function click(selector) { | ... | @@ -429,7 +429,7 @@ Casper.prototype.click = function click(selector) { |
429 | element.focus(); | 429 | element.focus(); |
430 | } | 430 | } |
431 | }, selector); | 431 | }, selector); |
432 | return success && this.mouseEvent('mouseup', selector); | 432 | return success; |
433 | }; | 433 | }; |
434 | 434 | ||
435 | /** | 435 | /** | ... | ... |
-
Please register or sign in to post a comment