src/ui/prompt.js
// Report a field as invalid, showing the given message to the user.
Report a field as invalid, showing the given message to the user.
Report a field as invalid showing the given message to the user .
reportInvalid(dom, message) {
    let parent = dom.parentNode
    let style = "left: " + (dom.offsetLeft + dom.offsetWidth + 2) + "px; top: " + (dom.offsetTop - 5) + "px"
    let msg = parent.appendChild(elt("div", {class: "ProseMirror-invalid", style}, message))
    setTimeout(() => parent.removeChild(msg), 1500)
  }
reportInvalid ( dom , message ) { let parent = dom . parentNode let style = "left: " + ( dom . offsetLeft + dom . offsetWidth + 2 ) + "px; top: " + ( dom . offsetTop - 5 ) + "px" let msg = parent . appendChild ( elt ( "div" , { class : "ProseMirror-invalid" , style } , message ) ) setTimeout ( ( ) => parent . removeChild ( msg ) , 1500 ) }
Report a field as invalid, showing the given message to the user.
Report a field as invalid showing the given message to the user .
// FIXME this is awful and needs a lot more work