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
ec7adf09
...
ec7adf0974f3b2dc731d79685da9ab2e7bfb9ce6
authored
2013-01-19 15:54:32 -0500
by
Lee Byrd
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
small refactoring
cleans up event firing after setting input value
1 parent
88b71458
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
modules/clientutils.js
modules/clientutils.js
View file @
ec7adf0
...
...
@@ -695,15 +695,12 @@
break
;
}
// firing the `change` event
var
changeEvent
=
document
.
createEvent
(
"HTMLEvents"
);
changeEvent
.
initEvent
(
'change'
,
true
,
true
);
field
.
dispatchEvent
(
changeEvent
);
// firing the `input` event
var
inputEvent
=
document
.
createEvent
(
"HTMLEvents"
);
inputEvent
.
initEvent
(
'input'
,
true
,
true
);
field
.
dispatchEvent
(
inputEvent
);
// firing the `change` and `input` events
[
'change'
,
'input'
].
forEach
(
function
(
name
)
{
var
event
=
document
.
createEvent
(
"HTMLEvents"
);
event
.
initEvent
(
name
,
true
,
true
);
field
.
dispatchEvent
(
event
);
});
// blur the field
try
{
...
...
Please
register
or
sign in
to post a comment