     (not (contains? #{37 38 39 40} (.-keyCode e))) )) ;; arrows
 
 
-(.addEventListener (get-text-el) "keyup" (utils/call-if char-keypress? notify-model))
-(.addEventListener (.-parentNode (get-slider-el)) "mouseup" notify-model)
-(.addEventListener (get-checkbox-el) "change" notify-model)
+(if-let [el (get-text-el)]
+  (reload-element el
+    #(.addEventListener % "keyup" (utils/call-if char-keypress? notify-model))) )
+(if-let [el (get-slider-el)]
+  (reload-element el
+    #(.addEventListener (.-parentNode %) "mouseup" notify-model)) )
+(if-let [el (get-checkbox-el)]
+  (reload-element el
+    #(.addEventListener % "change" notify-model)) )
 
 
 ;;;;

  ; (println "notify")
  (model/text-justification (get-text) (.-checked (get-checkbox-el)) (.-value (get-slider-el))))

(comment
;;;;
;;;; listeners
;;;;

(defn reload-element
  "allows for listeners removal"
  [el]
  (.replaceChild (.-parentNode el) (.cloneNode el true) el))
  ; (if el 
    ; (.replaceChild (.-parentNode el) (.cloneNode el true) el))
    ; ())
  

(reload-element (get-text-el))
(reload-element (get-slider-el))
(reload-element (get-checkbox-el))

(defn char-keypress? [e]
  ; (.log js/console e)



;; place react component
(if-let [el (get-result-view-el)]
  (reagent/render-component [text-justified-component] el))


; (defn on-js-reload []
