prosemirror-view
Advanced tools
Comparing version 1.0.10 to 1.0.11
{ | ||
"name": "prosemirror-view", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,3 +13,5 @@ const result = {} | ||
result.gecko = !ie && /gecko\/\d/i.test(navigator.userAgent) | ||
result.chrome = !ie && /Chrome\//.test(navigator.userAgent) | ||
let chrome = !ie && /Chrome\/(\d+)/.exec(navigator.userAgent) | ||
result.chrome = !!chrome | ||
result.chrome_version = chrome && +chrome[1] | ||
result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent) | ||
@@ -16,0 +18,0 @@ result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style |
@@ -191,3 +191,3 @@ import {TextSelection, NodeSelection} from "prosemirror-state" | ||
let {anchor, head} = sel, resetEditableFrom, resetEditableTo | ||
if (browser.webkit && !(sel instanceof TextSelection)) { | ||
if (brokenSelectBetweenUneditable && !(sel instanceof TextSelection)) { | ||
if (!sel.$from.parent.inlineContent) | ||
@@ -199,3 +199,3 @@ resetEditableFrom = temporarilyEditableNear(view, sel.from) | ||
view.docView.setSelection(anchor, head, view.root) | ||
if (browser.webkit) { | ||
if (brokenSelectBetweenUneditable) { | ||
if (resetEditableFrom) resetEditableFrom.contentEditable = "false" | ||
@@ -219,2 +219,5 @@ if (resetEditableTo) resetEditableTo.contentEditable = "false" | ||
// editable, set the selection, then set it uneditable again. | ||
const brokenSelectBetweenUneditable = browser.safari || browser.chrome && browser.chrome_version < 63 | ||
function temporarilyEditableNear(view, pos) { | ||
@@ -221,0 +224,0 @@ let {node, offset} = view.docView.domFromPos(pos) |
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 not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
683024
8098