draggin.js
// Stops editing text when you click away from it

Stops editing text when you click away from it
Stops editing text when you click away from it
function cancel(evt){
        if(!event.target.classList.contains("text")){
          editing = false;
          if(editing){
            editedText.blur();
          }
        }
    }
function cancel ( evt ) { if ( ! event . target . classList . contains ( "text" ) ) { editing = false ; if ( editing ) { editedText . blur ( ) ; } } }
Stops editing text when you click away from it
Stops editing text when you click away from it
// If the element clicked on is not text
 // Else, exit out of the edited text
