Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
698294ef
...
698294efab21ba4bc2fbad87b4bce1682fb80830
authored
2013-03-12 18:52:18 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refs #410 - click() mouse events ordering
1 parent
3a8d495e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
modules/casper.js
modules/casper.js
View file @
698294e
...
...
@@ -421,7 +421,7 @@ Casper.prototype.clear = function clear() {
Casper
.
prototype
.
click
=
function
click
(
selector
)
{
"use strict"
;
this
.
checkStarted
();
var
success
=
this
.
mouseEvent
(
'mousedown'
,
selector
);
var
success
=
this
.
mouseEvent
(
'mousedown'
,
selector
)
&&
this
.
mouseEvent
(
'mouseup'
,
selector
)
;
success
=
success
&&
this
.
mouseEvent
(
'click'
,
selector
);
this
.
evaluate
(
function
(
selector
)
{
var
element
=
__utils__
.
findOne
(
selector
);
...
...
@@ -429,7 +429,7 @@ Casper.prototype.click = function click(selector) {
element
.
focus
();
}
},
selector
);
return
success
&&
this
.
mouseEvent
(
'mouseup'
,
selector
)
;
return
success
;
};
/**
...
...
Please
register
or
sign in
to post a comment