mirror of
https://github.com/flarum/core.git
synced 2025-08-03 23:17:43 +02:00
Add FastClick
This commit is contained in:
@@ -80,4 +80,14 @@ app.initializers.replace('boot', () => {
|
||||
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