Loading src/mention/mention-list.ts +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import { getCaretCoordinates } from './caret-coords'; template: ` <ul class="dropdown-menu scrollable-menu" [hidden]="hidden"> <li *ngFor="let item of items; let i = index" [class.active]="activeIndex==i"> <a class="text-primary" (click)="activeIndex=i;itemClick.emit()">{{item}}</a> <a class="text-primary" (mousedown)="activeIndex=i;itemClick.emit();$event.preventDefault()">{{item}}</a> </li> </ul> ` Loading src/mention/mention-utils.ts +8 −6 Original line number Diff line number Diff line Loading @@ -25,15 +25,17 @@ export function insertValue(el, start, end, text, iframe, noRecursion=false) { } else if (!noRecursion) { var selObj = getWindowSelection(iframe); if (selObj && selObj.rangeCount>0) { var selRange = selObj.getRangeAt(0); var position = selRange.startOffset; var anchorNode = selObj.anchorNode; if (text.endsWith(' ')) { text = text.substring(0, text.length-1) + '\xA0'; } // if (text.endsWith(' ')) { // text = text.substring(0, text.length-1) + '\xA0'; // } insertValue(anchorNode, position-(end-start), position, text, iframe, true); } } } export function isInputOrTextAreaElement(el) { return el!=null && (el.nodeName == 'INPUT' || el.nodeName == 'TEXTAREA'); Loading Loading
src/mention/mention-list.ts +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import { getCaretCoordinates } from './caret-coords'; template: ` <ul class="dropdown-menu scrollable-menu" [hidden]="hidden"> <li *ngFor="let item of items; let i = index" [class.active]="activeIndex==i"> <a class="text-primary" (click)="activeIndex=i;itemClick.emit()">{{item}}</a> <a class="text-primary" (mousedown)="activeIndex=i;itemClick.emit();$event.preventDefault()">{{item}}</a> </li> </ul> ` Loading
src/mention/mention-utils.ts +8 −6 Original line number Diff line number Diff line Loading @@ -25,15 +25,17 @@ export function insertValue(el, start, end, text, iframe, noRecursion=false) { } else if (!noRecursion) { var selObj = getWindowSelection(iframe); if (selObj && selObj.rangeCount>0) { var selRange = selObj.getRangeAt(0); var position = selRange.startOffset; var anchorNode = selObj.anchorNode; if (text.endsWith(' ')) { text = text.substring(0, text.length-1) + '\xA0'; } // if (text.endsWith(' ')) { // text = text.substring(0, text.length-1) + '\xA0'; // } insertValue(anchorNode, position-(end-start), position, text, iframe, true); } } } export function isInputOrTextAreaElement(el) { return el!=null && (el.nodeName == 'INPUT' || el.nodeName == 'TEXTAREA'); Loading