Socket
Socket
Sign inDemoInstall

prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-view - npm Package Compare versions

Comparing version 1.32.0 to 1.32.1

2

package.json
{
"name": "prosemirror-view",
"version": "1.32.0",
"version": "1.32.1",
"description": "ProseMirror's view component",

@@ -5,0 +5,0 @@ "type": "module",

@@ -22,3 +22,8 @@ import {Selection, NodeSelection, TextSelection, AllSelection, EditorState} from "prosemirror-state"

if (sel instanceof TextSelection) {
if (!sel.empty || mods.indexOf("s") > -1) {
if (mods.indexOf("s") > -1) {
let {$head} = sel, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter
if (!node || node.isText || !node.isLeaf) return false
let $newHead = view.state.doc.resolve($head.pos + node.nodeSize * (dir < 0 ? -1 : 1))
return apply(view, new TextSelection(sel.$anchor, $newHead))
} else if (!sel.empty) {
return false

@@ -59,3 +64,2 @@ } else if (view.endOfTextblock(dir > 0 ? "forward" : "backward")) {

function isIgnorable(dom: Node, dir: number) {
if ((dom as HTMLElement).contentEditable == "false") return true
let desc = dom.pmViewDesc

@@ -62,0 +66,0 @@ return desc && desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != "BR")

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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