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.18.8 to 1.18.9

6

CHANGELOG.md

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

## 1.18.9 (2021-07-11)
### Bug fixes
Fix a bug in the previous release where `handleClickOn` wasn't fired anymore for clicks with the middle or right mouse button.
## 1.18.8 (2021-06-23)

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

2

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

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

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

this.selectNode = event[selectNodeModifier]
this.allowDefault = event.shiftKey || event.button != 0
this.allowDefault = event.shiftKey

@@ -356,15 +356,16 @@ let targetNode, targetPos

event.preventDefault()
} else if (this.flushed ||
// Safari ignores clicks on draggable elements
(browser.safari && this.mightDrag && !this.mightDrag.node.isAtom) ||
// Chrome will sometimes treat a node selection as a
// cursor, but still report that the node is selected
// when asked through getSelection. You'll then get a
// situation where clicking at the point where that
// (hidden) cursor is doesn't change the selection, and
// thus doesn't get a reaction from ProseMirror. This
// works around that.
(browser.chrome && !(this.view.state.selection instanceof TextSelection) &&
Math.min(Math.abs(pos.pos - this.view.state.selection.from),
Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {
} else if (event.button == 0 &&
(this.flushed ||
// Safari ignores clicks on draggable elements
(browser.safari && this.mightDrag && !this.mightDrag.node.isAtom) ||
// Chrome will sometimes treat a node selection as a
// cursor, but still report that the node is selected
// when asked through getSelection. You'll then get a
// situation where clicking at the point where that
// (hidden) cursor is doesn't change the selection, and
// thus doesn't get a reaction from ProseMirror. This
// works around that.
(browser.chrome && !(this.view.state.selection instanceof TextSelection) &&
Math.min(Math.abs(pos.pos - this.view.state.selection.from),
Math.abs(pos.pos - this.view.state.selection.to)) <= 2))) {
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), "pointer")

@@ -371,0 +372,0 @@ event.preventDefault()

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