lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.0.3 vs lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.1.0

- old
+ new

@@ -39,16 +39,19 @@ x: middle(pos.left, pos.right, viewport.width), y: middle(pos.top, pos.bottom, viewport.height) }; }; - Node.prototype.click = function() { + Node.prototype.click = function(event) { var pos, test; + if (event == null) { + event = 'click'; + } this.scrollIntoView(); pos = this.clickPosition(); test = this.clickTest(pos.x, pos.y); if (test.status === 'success') { - this.page.mouseEvent('click', pos.x, pos.y); + this.page.mouseEvent(event, pos.x, pos.y); return pos; } else { throw new Poltergeist.ClickFailed(test.selector, pos); } };