mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
Add FastClick
This commit is contained in:
@@ -80,4 +80,14 @@ app.initializers.replace('boot', () => {
|
|||||||
basePath + '/',
|
basePath + '/',
|
||||||
mapRoutes(app.routes, basePath)
|
mapRoutes(app.routes, basePath)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Initialize FastClick, which makes links and buttons much more responsive on
|
||||||
|
// touch devices.
|
||||||
|
$(() => {
|
||||||
|
FastClick.attach(document.body);
|
||||||
|
|
||||||
|
$('body').addClass('ontouchstart' in window ? 'touch' : 'no-touch');
|
||||||
|
});
|
||||||
|
|
||||||
|
app.booted = true;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user