How to implement fastclick to give a better UI feeling to habpanel!

Hey everyone,

HabPanel is really nice and easy to implement, it is one reason I move my smart home to openhab.

But on some tablets it feels slow when we interact with it. I have to say I don’t use expensive tablet for the dashboard because I don’t see the point for this purpose.

I decided to test the dashboard with fastclick polyfill, you can find it here:

For that I just made a clock widget with this in it:

<script type='application/javascript' src='/path/to/fastclick.js'></script>
if ('addEventListener' in document) {
	document.addEventListener('DOMContentLoaded', function() {
	}, false);

And OMG this make a feeling of a really fast UI I like. But this is an hack. Is there not better place/way to do it ?


Note: As of late 2015 most mobile browsers - notably Chrome and Safari - no longer have a 300ms touch delay, so fastclick offers no benefit on newer browsers, and risks introducing bugs into your application. Consider carefully whether you really need to use it.

Unfortunately mine from China has… :smile: But I am agree to not implement by default. Just a way for me to add a JS library in the layout of habpanel if there is.


I am struggling with this,

Added your exact code snipet into my widget, exceot changed the source to /static/js/fastclick.js

dowloaded the js file from the gitrepo to /conf/html/js/fastclick.js

Changed ownership etc

No love, no luck :frowning:

Are you using this method still and can you see what I did wrong?