Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

selection-ranges

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selection-ranges - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

4

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## 1.2.0
* `FEAT`: support MS Edge style `div` containers
## 1.1.0

@@ -11,0 +15,0 @@

37

index.js

@@ -50,7 +50,3 @@ 'use strict';

if (el !== focusNode && !el.contains(focusNode)) {
return false;
}
return true;
return el == focusNode || el.contains(focusNode);
}

@@ -142,5 +138,10 @@

if (!isClosing) {
// <br />, </div>, </p> node
if (isBr(next) || isDiv(next)) {
if (
isBr(next) || (
next.previousSibling && (
isDiv(next) ||
isParagraph(next)
)
)
) {
count++;

@@ -150,7 +151,2 @@ }

if (isClosing) {
if (isParagraph(next)) {
count++;
}
}

@@ -272,3 +268,10 @@ if (isText(next)) {

if (!isClosing) {
if (isDiv(next) || isBr(next)) {
if (
isBr(next) || (
next.previousSibling && (
isDiv(next) ||
isParagraph(next)
)
)
) {
count++;

@@ -278,8 +281,2 @@ }

if (isClosing) {
if (isParagraph(next)) {
count++;
}
}
if (isText(next)) {

@@ -286,0 +283,0 @@

{
"name": "selection-ranges",
"version": "1.1.0",
"version": "1.2.0",
"description": "Selection range manipulation for contenteditable elements",

@@ -5,0 +5,0 @@ "main": "index.js",

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