Skip to content

Instantly share code, notes, and snippets.

@karlcow
Last active May 20, 2019 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlcow/24db5d1c03aec08c3d0ea999184c95ca to your computer and use it in GitHub Desktop.
Save karlcow/24db5d1c03aec08c3d0ea999184c95ca to your computer and use it in GitHub Desktop.
Documenting fastclick finding on webcompat.com

January 2019

FastClick is breaking mobile sites on Firefox Android. There are currently a number of issues related to this issue.

attach?

so I was wondering what was attach, the source code is giving the answer.

https://github.com/ftlabs/fastclick/blob/536219b81e558c65735b2f65972a40a68a3484d8/lib/fastclick.js#L818-L827

	FastClick.attach = function(layer, options) {
		return new FastClick(layer, options);
};

Patterns

In the index page.

	FastClick.attach(document.body);

http://js.dhresource.com/mobile_v2/common/headfoot/v1/headfoot.js?v=1547532659381

  c.attach = function(a, d) {
    return new c(a, d)
  };
  'function' === typeof define && 'object' === typeof define.amd && define.amd ? define('tools/fastclick', [], function() {
    return c
  }) : 'undefined' !== typeof module && module.exports ? (module.exports = c.attach, module.exports.FastClick = c) : window.FastClick = c
			FastClick.attach(document.body);
FastClick.attach(document.body);
FastClick.attach=function(a){return new FastClick(a)};
e(function () {
'undefined' != typeof FastClick && 'undefined' != typeof t.body && FastClick.attach(t.body)
});
FastClick.attach(document.body),
  e(function () {
    typeof FastClick != 'undefined' && typeof n.body != 'undefined' && FastClick.attach(n.body)
  });
e.attach = function (t, i) {
return new e(t, i)
},
'function' == typeof define && 'object' == typeof define.amd && define.amd ? define(function () {
return e
})  : 'undefined' != typeof module && module.exports ? (module.exports = e.attach, module.exports.FastClick = e)  : window.FastClick = e
}(),
    $(function() {
      FastClick.attach(document.body);
    });
@karlcow
Copy link
Author

karlcow commented May 20, 2019

  • yes
  • no
  • maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment