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
c5757e9a
Commit
c5757e9a
authored
Dec 28, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GFM dropdown not showing at beginning of new lines
Closes #26145
parent
b93c72e3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
app/assets/javascripts/gfm_auto_complete.js.es6
app/assets/javascripts/gfm_auto_complete.js.es6
+1
-1
changelogs/unreleased/gfm-new-line-fix.yml
changelogs/unreleased/gfm-new-line-fix.yml
+4
-0
spec/features/issues/gfm_autocomplete_spec.rb
spec/features/issues/gfm_autocomplete_spec.rb
+12
-0
No files found.
app/assets/javascripts/gfm_auto_complete.js.es6
View file @
c5757e9a
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
var _a, _y, regexp, match, atSymbolsWithBar, atSymbolsWithoutBar;
var _a, _y, regexp, match, atSymbolsWithBar, atSymbolsWithoutBar;
atSymbolsWithBar = Object.keys(this.app.controllers).join('|');
atSymbolsWithBar = Object.keys(this.app.controllers).join('|');
atSymbolsWithoutBar = Object.keys(this.app.controllers).join('');
atSymbolsWithoutBar = Object.keys(this.app.controllers).join('');
subtext = subtext.split(
' '
).pop();
subtext = subtext.split(
/\s+/g
).pop();
flag = flag.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
flag = flag.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
_a = decodeURI("%C3%80");
_a = decodeURI("%C3%80");
...
...
changelogs/unreleased/gfm-new-line-fix.yml
0 → 100644
View file @
c5757e9a
---
title
:
Fixed GFM dropdown not showing on new lines
merge_request
:
author
:
spec/features/issues/gfm_autocomplete_spec.rb
View file @
c5757e9a
...
@@ -47,6 +47,18 @@ feature 'GFM autocomplete', feature: true, js: true do
...
@@ -47,6 +47,18 @@ feature 'GFM autocomplete', feature: true, js: true do
expect_to_wrap
(
true
,
label_item
,
note
,
label
.
title
)
expect_to_wrap
(
true
,
label_item
,
note
,
label
.
title
)
end
end
it
"shows dropdown after a new line"
do
note
=
find
(
'#note_note'
)
page
.
within
'.timeline-content-form'
do
note
.
native
.
send_keys
(
'test'
)
note
.
native
.
send_keys
(
:enter
)
note
.
native
.
send_keys
(
:enter
)
note
.
native
.
send_keys
(
'@'
)
end
expect
(
page
).
to
have_selector
(
'.atwho-container'
)
end
it
"does not show dropdown when preceded with a special character"
do
it
"does not show dropdown when preceded with a special character"
do
note
=
find
(
'#note_note'
)
note
=
find
(
'#note_note'
)
page
.
within
'.timeline-content-form'
do
page
.
within
'.timeline-content-form'
do
...
...
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