                                      (highlight-clear!))))})
 
             (when autocomplete-open?
-              (dom/div #js {:className "autocomplete"}
+              (dom/div #js {:className "autocomplete"
+                            :onWheel (fn [e] (.log js/console "wheel" e))}
                 (if (seq results)
                   (apply dom/div nil
                     (map-indexed

;                text to replace message with


(def engines
  [
   ; ... :emoji  -> autocomplete emoji

    (init-state [_]
      {:text ""
       :force-close? false
       :highlighted-result-index -1
       :results nil
       :kill-chan (chan)
       :autocomplete-chan (chan)
       })
    om/IWillMount
    (will-mount [_]
      (let [autocomplete (debounce (om/get-state owner :autocomplete-chan) 200)
            kill-chan (om/get-state owner :kill-chan)]
        (go (loop []
              (let [[v ch] (alts! [autocomplete kill-chan])]
                (when (= ch autocomplete)
                  (om/set-state! owner :results
                                 (seq (mapcat (fn [e] (e v (config :thread-id))) engines)))
                  (recur)))))))
    om/IWillUnmount
    (will-unmount [_]
      (put! (om/get-state owner :kill-chan) (js/Date.)))
    om/IWillUpdate
    (will-update [_ next-props next-state]
      (let [next-text (next-state :text)
            prev-text (om/get-render-state owner :text)]
        (when (not= next-text prev-text)
          (put! (om/get-state owner :autocomplete-chan) next-text))))
    om/IRenderState
    (render-state [_ {:keys [results text force-close? highlighted-result-index] :as state}]
      (let [constrain (fn [x a z] (Math/min z (Math/max a x)))
            highlight-next!
            (fn []
              (om/update-state! owner :highlighted-result-index
