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

codemirror

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemirror - npm Package Compare versions

Comparing version 5.58.0 to 5.58.1

18

addon/display/placeholder.js

@@ -18,3 +18,3 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others

cm.on("swapDoc", onChange);
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = () => onComposition(cm))
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) })
onChange(cm);

@@ -53,9 +53,11 @@ } else if (!val && prev) {

function onComposition(cm) {
var empty = true, input = cm.getInputField()
if (input.nodeName == "TEXTAREA")
empty = !input.value
else if (cm.lineCount() == 1)
empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
if (empty) clearPlaceholder(cm)
else setPlaceholder(cm)
setTimeout(function() {
var empty = false, input = cm.getInputField()
if (input.nodeName == "TEXTAREA")
empty = !input.value
else if (cm.lineCount() == 1)
empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
if (empty) setPlaceholder(cm)
else clearPlaceholder(cm)
}, 20)
}

@@ -62,0 +64,0 @@

{
"name": "codemirror",
"version": "5.58.0",
"version": "5.58.1",
"main": "lib/codemirror.js",

@@ -5,0 +5,0 @@ "style": "lib/codemirror.css",

@@ -69,2 +69,2 @@ // EDITOR CONSTRUCTOR

CodeMirror.version = "5.58.0"
CodeMirror.version = "5.58.1"

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

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

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