and if you want a child to not be able to be drag and dropped (e.g. if it is a wysiwyg/input field)
(defn as-undraggable!
[el]
{:pre [(wheel.dom.data/el? el)]
:post [(wheel.dom.data/el? %)]}
; <https://stackoverflow.com/questions/6848140/how-do-i-prevent-drag-on-a-child-but-allow-drag-on-the-parent/38387748#38387748>
(el
:draggable "true"
:dragstart (comp wheel.dom.events/stop-propagation wheel.dom.events/prevent-default)))
Does anyone ever have trouble with the auto-reload setup with Hoplon and CSS? It seems to get in this weird mode sometimes where it will notice that a CSS file has changed and reload, but it won't pickup the changes and sometimes it may even show like a version of the page with old (cached?) CSS.
which browser?
there are browser bugs that have css workarounds
Chrome
does mousing over things cause it to update?
Good tip to look at the browser 👍 , Firefox behaves better with the reloads
I still have to refresh the page sometimes after a auto-reload but it at least works after that
i forget what the workaround was though
but there was a snippet of css that triggered the refresh properly to work around this issue
Well thanks for that suggestion in the first place
aha
i think i may have found it
https://github.com/tapio/live-server/issues/5#issuecomment-70426600
that looks like the workaround
@-webkit-keyframes livefix { from { opacity: 1; } to { opacity: 1; } }
html { -webkit-animation: livefix infinite 1s; }
just put that in your css somewhere
cheesy, but doing things in the browser you're already knee deep in cheese, what's a few more inches
Hmm, doesn't seem to work for me.
melty cheese abounds
oh bummer
That's OK, auto-reload is working good in firefox! I haven't really done any CSS before so this is helping a lot. Thanks!
sure!
i hear that new version of firefox has great dev tools too
i'm told they're as good as chrome now
so hopefully it will work ok for you
I'm just pleased as punch to have auto-reload working well again 🙂
i always used chrome because the dev tools were so much better than firebug