MCPcopy Create free account
hub / github.com/breck7/scroll / onComposition

Function onComposition

external/.scrollLibs.js:13343–13353  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

13341 }
13342
13343 function onComposition(cm) {
13344 setTimeout(function () {
13345 var empty = false
13346 if (cm.lineCount() == 1) {
13347 var input = cm.getInputField()
13348 empty = input.nodeName == "TEXTAREA" ? !cm.getLine(0).length : !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
13349 }
13350 if (empty) setPlaceholder(cm)
13351 else clearPlaceholder(cm)
13352 }, 20)
13353 }
13354
13355 function onBlur(cm) {
13356 if (isEmpty(cm)) setPlaceholder(cm)

Callers 1

.scrollLibs.jsFile · 0.85

Calls 3

setPlaceholderFunction · 0.85
clearPlaceholderFunction · 0.85
getLineMethod · 0.45

Tested by

no test coverage detected