-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hi,
I am trying to dispatch a click event on a button -
(defn enter-to-click
"It captures the enter event on the given element selector (s1) and triggers a click event on the element selector (s2)"
[s1 s2]
(let [el1 (sel s1) el2 (sel s2)]
(listen! el1 :keydown (fn [ev]
(when (= (:keyCode ev) 13)
(dispatch! (sel "#sign_in") "click" {}))))))The listen! event works, I am even able to log messages from the when block , however the dispatch doesnt work. I am however able to trigger a click event using jquery from the browsers console.
Any help will be appreciated.
Thanks,
Murtaza
Metadata
Metadata
Assignees
Labels
No labels