BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
dbf9ccbc
Commit
dbf9ccbc
authored
Oct 07, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check originalEvent.repeat *and* event.repeat
phantomjs < 2.0 doesn't support creating `KeyboardEvent` so the tests were failing on CI
parent
fcf99d0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
quick_submit.js.coffee
app/assets/javascripts/behaviors/quick_submit.js.coffee
+1
-1
quick_submit_spec.js.coffee
spec/javascripts/behaviors/quick_submit_spec.js.coffee
+1
-4
No files found.
app/assets/javascripts/behaviors/quick_submit.js.coffee
View file @
dbf9ccbc
...
...
@@ -14,7 +14,7 @@
# </form>
#
$
(
document
).
on
'keydown.quick_submit'
,
'.js-quick-submit'
,
(
e
)
->
return
if
e
.
originalEvent
.
repeat
return
if
(
e
.
originalEvent
&&
e
.
originalEvent
.
repeat
)
||
e
.
repeat
return
unless
e
.
keyCode
==
13
# Enter
if
navigator
.
userAgent
.
match
(
/Macintosh/
)
...
...
spec/javascripts/behaviors/quick_submit_spec.js.coffee
View file @
dbf9ccbc
...
...
@@ -67,7 +67,4 @@ describe 'Quick Submit behavior', ->
else
defaults
=
{
keyCode
:
13
,
ctrlKey
:
true
}
args
=
$
.
extend
({},
defaults
,
options
)
originalEvent
=
new
KeyboardEvent
(
'keydown'
,
args
)
$
.
Event
(
'keydown'
,
$
.
extend
({},
args
,
{
originalEvent
:
originalEvent
}))
$
.
Event
(
'keydown'
,
$
.
extend
({},
defaults
,
options
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment