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
d11b1e20
...
d11b1e206eee8a232e87f25953ac21917284a6a1
authored
2012-09-22 11:23:04 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'chiefcll/fix-click-event' into pr-222
2 parents
dabbee8d
52e6132d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
modules/clientutils.js
modules/clientutils.js
View file @
d11b1e2
...
...
@@ -423,7 +423,18 @@
}
try
{
var
evt
=
document
.
createEvent
(
"MouseEvents"
);
evt
.
initMouseEvent
(
type
,
true
,
true
,
window
,
1
,
1
,
1
,
1
,
1
,
false
,
false
,
false
,
false
,
0
,
elem
);
try
{
var
pos
=
elem
.
getBoundingClientRect
(),
center_x
=
Math
.
floor
((
pos
.
left
+
pos
.
right
)
/
2
),
center_y
=
Math
.
floor
((
pos
.
top
+
pos
.
bottom
)
/
2
);
}
catch
(
e
)
{
var
center_x
=
1
,
center_y
=
1
;
}
evt
.
initMouseEvent
(
type
,
true
,
true
,
window
,
1
,
1
,
1
,
center_x
,
center_y
,
false
,
false
,
false
,
false
,
0
,
elem
);
// dispatchEvent return value is false if at least one of the event
// handlers which handled this event called preventDefault;
// so we cannot returns this results as it cannot accurately informs on the status
...
...
Please
register
or
sign in
to post a comment