New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng2-mentions

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-mentions - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

2

dist/mention/mention.d.ts

@@ -24,4 +24,4 @@ import { ElementRef } from "@angular/core";

stopEvent(event: any): void;
keyHandler(event: any, nativeElement?: any, wasClick?: boolean): boolean;
keyHandler(event: any, nativeElement?: any): boolean;
showSearchList(nativeElement: any): void;
}

@@ -50,9 +50,10 @@ "use strict";

Mention.prototype.stopEvent = function (event) {
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
if (!event.wasClick) {
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
}
};
Mention.prototype.keyHandler = function (event, nativeElement, wasClick) {
Mention.prototype.keyHandler = function (event, nativeElement) {
if (nativeElement === void 0) { nativeElement = this._element.nativeElement; }
if (wasClick === void 0) { wasClick = false; }
var val = mention_utils_1.getValue(nativeElement);

@@ -75,3 +76,3 @@ var pos = mention_utils_2.getCaretPosition(nativeElement, this.iframe);

}
if (event.keyCode == 13 && wasClick && pos < this.startPos) {
if (event.keyCode == 13 && event.wasClick && pos < this.startPos) {
// put caret back in position prior to contenteditable menu click

@@ -157,4 +158,4 @@ pos = this.startNode.length;

nativeElement.focus();
var fakeKeydown = new KeyboardEvent('keydown', { "keyCode": KEY_ENTER });
_this.keyHandler(fakeKeydown, nativeElement, true);
var fakeKeydown = { "keyCode": KEY_ENTER, "wasClick": true };
_this.keyHandler(fakeKeydown, nativeElement);
});

@@ -161,0 +162,0 @@ });

{
"name": "ng2-mentions",
"version": "0.3.4",
"version": "0.3.5",
"description": "Angular 2 mentions for text fields.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc