drab-blur doesnt work
dokuzbir opened this issue · comments
Drab-change works as usual with that code. But when i try to use drab-blur nothing happens.
<input drab-blur="show_log" class="form-control" id="drab-example">
defhandler show_log(socket, sender) do
IO.inspect("I am working")
end
Event works when i try in javascript so there is no problem with browser or javascript
document.querySelector("#drab-example").addEventListener("blur", function(){
alert("I am working")
})
Hi @dokuzbir,
this is expected, see the documentation.
drab-event="handler"
is the shorthand for more elaborate form, drab="event:handler"
, and by default it is set only for a few most popular events, and blur
is not on the list.
So if you are using blur
many times, you might add it to :events_shorthands
config. Or just use:
<input drab="blur:show_log" class="form-control" id="drab-example">