Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a7ea0e6b
Commit
a7ea0e6b
authored
May 22, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed what bit of code stops the callback
parent
ca6e2a45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
app/assets/javascripts/ide/components/ide.vue
app/assets/javascripts/ide/components/ide.vue
+5
-4
spec/javascripts/ide/components/ide_spec.js
spec/javascripts/ide/components/ide_spec.js
+6
-0
No files found.
app/assets/javascripts/ide/components/ide.vue
View file @
a7ea0e6b
...
@@ -44,9 +44,7 @@ export default {
...
@@ -44,9 +44,7 @@ export default {
e
.
preventDefault
();
e
.
preventDefault
();
}
}
if
(
!
e
.
target
.
classList
.
contains
(
'
inputarea
'
))
{
this
.
toggleFileFinder
(
!
this
.
fileFindVisible
);
this
.
toggleFileFinder
(
!
this
.
fileFindVisible
);
}
});
});
Mousetrap
.
stopCallback
=
(
e
,
el
,
combo
)
=>
this
.
mousetrapStopCallback
(
e
,
el
,
combo
);
Mousetrap
.
stopCallback
=
(
e
,
el
,
combo
)
=>
this
.
mousetrapStopCallback
(
e
,
el
,
combo
);
...
@@ -54,7 +52,10 @@ export default {
...
@@ -54,7 +52,10 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'
toggleFileFinder
'
]),
...
mapActions
([
'
toggleFileFinder
'
]),
mousetrapStopCallback
(
e
,
el
,
combo
)
{
mousetrapStopCallback
(
e
,
el
,
combo
)
{
if
(
combo
===
'
t
'
&&
el
.
classList
.
contains
(
'
dropdown-input-field
'
))
{
if
(
(
combo
===
'
t
'
&&
el
.
classList
.
contains
(
'
dropdown-input-field
'
))
||
el
.
classList
.
contains
(
'
inputarea
'
)
)
{
return
true
;
return
true
;
}
else
if
(
combo
===
'
command+p
'
||
combo
===
'
ctrl+p
'
)
{
}
else
if
(
combo
===
'
command+p
'
||
combo
===
'
ctrl+p
'
)
{
return
false
;
return
false
;
...
...
spec/javascripts/ide/components/ide_spec.js
View file @
a7ea0e6b
...
@@ -107,5 +107,11 @@ describe('ide component', () => {
...
@@ -107,5 +107,11 @@ describe('ide component', () => {
vm
.
mousetrapStopCallback
(
null
,
vm
.
$el
.
querySelector
(
'
.dropdown-input-field
'
),
'
t
'
),
vm
.
mousetrapStopCallback
(
null
,
vm
.
$el
.
querySelector
(
'
.dropdown-input-field
'
),
'
t
'
),
).
toBe
(
true
);
).
toBe
(
true
);
});
});
it
(
'
stops callback in monaco editor
'
,
()
=>
{
setFixtures
(
'
<div class="inputarea"></div>
'
);
expect
(
vm
.
mousetrapStopCallback
(
null
,
document
.
querySelector
(
'
.inputarea
'
),
'
t
'
)).
toBe
(
true
);
});
});
});
});
});
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