reflex-frp / reflex-dom

Web applications without callbacks or side-effects. Reflex-DOM brings the power of functional reactive programming (FRP) to the web. Build HTML and other Document Object Model (DOM) data with a pure functional interface.

Home Page:https://reflex-frp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

implement _*ElementConfig_setFocus

plt-amy opened this issue · comments

Basically the same thing as _inputElementConfig_setValue but for calling .focus() on the underlying element when the event fires.

Second this. This is my workaround, cf.

#424

import GHCJS.DOM.HTMLElement (focus)

-- post build auto focus: the post build event happens before the element
-- is mounted. postmount event waits for pull request to be accepted
-- https://github.com/reflex-frp/reflex-dom-semui/issues/18
ePb <- delay 0.1 =<< getPostBuild
performEvent_ $ ePb $> focus (_inputElement_raw kbInput)