   [corpus query-cursor show-remove-btn? remove-query-handler]
   (let [displayed-query (:query @query-cursor)
         on-text-changed (fn [event query-cursor _]
-                          (let [value      (aget event "target" "value")
+                          (let [value      (.-target.value event)
                                 query      (->non-headword-query value)
                                 hw-search? (= (->headword-query query) value)]
                             (swap! query-cursor assoc :query query :headword-search hw-search?)))]

                            (str/replace #"\s*\[\]\s*" " .* ")
                            (str/replace #"^\.\*$" ""))
        on-text-changed (fn [event query-cursor phonetic?]
                          (let [value (aget event "target" "value")
                                query (if (= value "") "" (phrase->cqp value phonetic?))]
                            (swap! query-cursor assoc :query query)))]
    [single-input-view corpus query-cursor displayed-query show-remove-btn?


(defn- on-phonetic-changed [event query-cursor]
  (let [q        (:query @query-cursor)
        checked? (.-target.checked event)
        query    (if checked?
                   (if (str/blank? q)
                     "[phon=\".*\" %c]"
