[26338] Allow spaces in matcher for principal mentions (#5930)

* [26338] Allow spaces in matcher for principal mentions

* Bump atwho.js to 1.5.4 and use option 'acceptSpaceBar'

[ci skip]
pull/5936/head
Oliver Günther 7 years ago committed by GitHub
parent 93c03c63b6
commit 93f7e4f7c1
  1. 1
      frontend/app/components/common/autocomplete/auto-complete-helper.service.ts
  2. 2
      frontend/vendor/at.js/jquery.atwho.min.js
  3. 5
      spec/features/work_packages/details/inplace_editor/shared_examples.rb

@ -41,6 +41,7 @@ export class AutoCompleteHelperService {
limit: 10,
highlightFirst: true,
suffix: '',
acceptSpaceBar: true,
textarea: textarea,
callbacks: {
remoteFilter: (query:string, callback:Function) => {

File diff suppressed because one or more lines are too long

@ -125,11 +125,14 @@ end
shared_examples 'a principal autocomplete field' do
let!(:user) { FactoryGirl.create :user, member_in_project: project, firstname: 'John' }
let!(:mentioned_user) { FactoryGirl.create :user, member_in_project: project, firstname: 'Laura' }
let!(:mentioned_user) { FactoryGirl.create :user, member_in_project: project, firstname: 'Laura', lastname: 'Foobar' }
it 'autocompletes links to user profiles' do
field.activate!
field.input_element.send_keys(" @lau")
expect(page).to have_selector('.atwho-view-ul li.cur', text: mentioned_user.name)
field.input_element.send_keys(" @Laura Fo")
expect(page).to have_selector('.atwho-view-ul li.cur', text: mentioned_user.name)
end
end

Loading…
Cancel
Save