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

prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
284
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.4.2 to 1.4.3

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.4.3 (2018-08-12)
### Bug fixes
Fix an issue where the editor got stuck believing shift was down (and hence pasting as plain text) when it was unfocused with shift held down.
## 1.4.2 (2018-08-03)

@@ -2,0 +8,0 @@

2

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

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

@@ -121,5 +121,11 @@ import {Fragment, DOMParser} from "prosemirror-model"

}
// Work around issue in Chrome where backspacing sometimes replaces the deleted content with a random BR node
if (browser.chrome && view.lastKeyCode === 8 && toOffset > fromOffset &&
parent.childNodes[toOffset - 1].nodeType == "BR" && !parent.childNodes[toOffset - 1].pmViewDesc) toOffset--
// Work around issue in Chrome where backspacing sometimes replaces
// the deleted content with a random BR node (issues #799, #831)
if (browser.chrome && view.lastKeyCode === 8) {
for (let off = toOffset; off > fromOffset; off--) {
let node = parent.childNodes[off - 1], desc = node.pmViewDesc
if (node.nodeType == "BR" && !desc) { toOffset = off; break }
if (!desc || desc.size) break
}
}
let startDoc = oldState.doc

@@ -126,0 +132,0 @@ let parser = view.someProp("domParser") || DOMParser.fromSchema(view.state.schema)

@@ -74,3 +74,3 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state"

editHandlers.keydown = (view, event) => {
if (event.keyCode == 16) view.shiftKey = true
view.shiftKey = event.keyCode == 16 || event.shiftKey
if (view.inDOMChange) {

@@ -223,2 +223,3 @@ if (view.inDOMChange.composing) return

handlers.mousedown = (view, event) => {
view.shiftKey = event.shiftKey
let flushed = forceDOMFlush(view)

@@ -225,0 +226,0 @@ let now = Date.now(), type

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