Commit 3e29f16b authored by dmacfarlane's avatar dmacfarlane
Browse files

fix: update seach when shift + char pressed

parent 4671cebf
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -86,7 +86,7 @@ describe('angular2-mentions App', function() {
      expect(getValue(el, tagName)).toEqual('Hello @Aaron and @Gavin and !!');
      expect(getValue(el, tagName)).toEqual('Hello @Aaron and @Gavin and !!');
      
      
      // and insert another mention
      // and insert another mention
      el.sendKeys('@he', protractor.Key.ENTER);
      el.sendKeys('@HE', protractor.Key.ENTER);
      expect(menu.isDisplayed()).toBe(false);
      expect(menu.isDisplayed()).toBe(false);
      expect(getValue(el, tagName)).toEqual('Hello @Aaron and @Gavin and @Henry!!');
      expect(getValue(el, tagName)).toEqual('Hello @Aaron and @Gavin and @Henry!!');
    });  
    });  
+2 −1
Original line number Original line Diff line number Diff line
@@ -101,7 +101,8 @@ export class MentionDirective {
      this.showSearchList(nativeElement);
      this.showSearchList(nativeElement);
    }
    }
    else if (this.startPos >= 0 && !this.stopSearch) {
    else if (this.startPos >= 0 && !this.stopSearch) {
      if (!event.shiftKey &&
      // ignore shift when pressed alone, but not when used with another key
      if (event.keyCode !== KEY_SHIFT &&
          !event.metaKey &&
          !event.metaKey &&
          !event.altKey &&
          !event.altKey &&
          !event.ctrlKey &&
          !event.ctrlKey &&