@samitouri / QOS-React-2 / commits / b8857d4f27

Remove captured focus feature check (#9285)

IE8 was the only browser that did not support captured focus. We no longer have that constraint.

Nathan Hunzaker committed Mar 30, 2017 at 16:47 UTC b8857d4f27c08c23553fd5cb02d9d6223068b49d
1 file changed +10 -25
src/renderers/dom/shared/ReactBrowserEventEmitter.js
+10 -25
@@ -268,31 +268,16 @@ var ReactBrowserEventEmitter = Object.assign({}, ReactEventEmitterMixin, {
268 mountAt,
269 );
270 } else if (dependency === 'topFocus' || dependency === 'topBlur') {
271 - if (isEventSupported('focus', true)) {
272 - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
273 - 'topFocus',
274 - 'focus',
275 - mountAt,
276 - );
277 - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
278 - 'topBlur',
279 - 'blur',
280 - mountAt,
281 - );
282 - } else if (isEventSupported('focusin')) {
283 - // IE has `focusin` and `focusout` events which bubble.
284 - // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
285 - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
286 - 'topFocus',
287 - 'focusin',
288 - mountAt,
289 - );
290 - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(
291 - 'topBlur',
292 - 'focusout',
293 - mountAt,
294 - );
295 - }
271 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
272 + 'topFocus',
273 + 'focus',
274 + mountAt,
275 + );
276 + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
277 + 'topBlur',
278 + 'blur',
279 + mountAt,
280 + );
281
282 // to make sure blur and focus event listeners are only attached once
283 isListening.topBlur = true;