From 42fd2266328cf832253071f13897586aa51988d4 Mon Sep 17 00:00:00 2001 From: Hrusikesh Panda Date: Sat, 15 Sep 2018 19:02:53 -0400 Subject: [PATCH] fix: Workaround for Firefox outside click issue (#177) Closes #148 --- __snapshots__/src/checkbox/index.test.js.md | 2 ++ __snapshots__/src/checkbox/index.test.js.snap | Bin 252 -> 305 bytes docs/bundle.js | 2 +- src/checkbox/index.js | 11 ++++++++++- src/checkbox/index.test.js | 14 ++++++++++++++ src/tag/index.test.js | 11 ++++------- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/__snapshots__/src/checkbox/index.test.js.md b/__snapshots__/src/checkbox/index.test.js.md index ac19e9ef..3a2030f2 100644 --- a/__snapshots__/src/checkbox/index.test.js.md +++ b/__snapshots__/src/checkbox/index.test.js.md @@ -10,6 +10,7 @@ Generated by [AVA](https://ava.li). @@ -19,5 +20,6 @@ Generated by [AVA](https://ava.li). diff --git a/__snapshots__/src/checkbox/index.test.js.snap b/__snapshots__/src/checkbox/index.test.js.snap index 8120bd31f8454897a613660ba1062a5269149d60..9fb5e85cf1f47ae0bee5948f2477acccc33c33fd 100644 GIT binary patch delta 279 zcmV+y0qFkx0kHxiK~_N^Q*L2!b7*gLAa*ed0RZ~6AWMBW|o8OFJ(T9v6U9vzHBcl+bKw?>!`kOnwYP*9NRe?0>u4+A4J z10x?$50fZ}1=PuzoRe5w?3b9E3TzW$D^AQU$Vp{j dnZ=1oIjJdN0Y(9^Uk}p5uK;QlI361U005SAYqS6W delta 226 zcmV<803H9a0{j6YK~_N^Q*L2!b7*gLAa*ed0RWqh_jHEe2}xr2`!H{}vxbo(B!6HH z5dY}i&~%aihkZ-PhD>W|o8OFJQGZ5|E?FRpkx__IAh9e_w;-o9Ju^?YC^a#;gb@Uo z7?~r13gUsd9f(C3S%er_GxG{cO9TW(7}C zKs`*NjLZxmot()ziN(c!iMgpT5jVEt#N2|MR5W!gC6xtmB^=2asma+%`4uF%wT^PP ca-?JyCnn{jrho+)1&DGY0G2OOn27-Z0CL`5{Qv*} diff --git a/docs/bundle.js b/docs/bundle.js index 7fddf3de..33ba6e40 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -1 +1 @@ -!function(e){var a={};function l(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=a,l.d=function(e,a,n){l.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},l.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(a,"a",a),a},l.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},l.p="",l(l.s=54)}([function(module,exports,__webpack_require__){"use strict";eval("\n\nif (true) {\n module.exports = __webpack_require__(125);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/react/index.js?")},function(module,exports,__webpack_require__){eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(83)();\n}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?")},function(module,exports,__webpack_require__){eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(113)();\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-router/node_modules/prop-types/index.js?")},function(module,exports,__webpack_require__){"use strict";eval("/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (false) {}\n\nmodule.exports = warning;\n\n\n//# sourceURL=webpack:///./node_modules/warning/browser.js?")},function(module,exports,__webpack_require__){eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(115)();\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-router-dom/node_modules/prop-types/index.js?")},function(module,exports,__webpack_require__){"use strict";eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {}\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n//# sourceURL=webpack:///./node_modules/invariant/browser.js?")},function(module,exports,__webpack_require__){eval('/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === "undefined") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve "head" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector("#foo").shadowRoot }\n // }\n if (typeof target === \'function\') {\n return target();\n }\n if (typeof memo[target] === "undefined") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(73);\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== "undefined" && DEBUG) {\n\t\tif (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === "object" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of