]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Initialize new event to prevent JS error.
authorMarius Olbertz <marius.olbertz@gmail.com>
Tue, 22 Mar 2016 15:41:21 +0000 (16:41 +0100)
committerMarius Olbertz <marius.olbertz@gmail.com>
Tue, 22 Mar 2016 15:41:21 +0000 (16:41 +0100)
Did this work without `new` actually?

js/foundation.util.touch.js

index 5a5a2a69ff6ac1b8eef58377706876c0d86b2255..3852ac01ad717707042ee25ac63ba0c94b0d5d6c 100644 (file)
         ;
 
       if('MouseEvent' in window && typeof window.MouseEvent === 'function') {
-        simulatedEvent = window.MouseEvent(type, {
+        simulatedEvent = new window.MouseEvent(type, {
           'bubbles': true,
           'cancelable': true,
           'screenX': first.screenX,