diff --git a/examples/src/index.html b/examples/src/index.html
index 7a82163278..ef73bc923f 100644
--- a/examples/src/index.html
+++ b/examples/src/index.html
@@ -37,7 +37,9 @@
Examples:
-
+
+
+
diff --git a/src/Select.js b/src/Select.js
index ba943ac87c..7d83d02461 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -119,11 +119,19 @@ var Select = React.createClass({
};
this._bindCloseMenuIfClickedOutside = function() {
- document.addEventListener('click', self._closeMenuIfClickedOutside);
+ if (!document.addEventListener && document.attachEvent) {
+ document.attachEvent('onclick', this._closeMenuIfClickedOutside);
+ } else {
+ document.addEventListener('click', this._closeMenuIfClickedOutside);
+ }
};
this._unbindCloseMenuIfClickedOutside = function() {
- document.removeEventListener('click', self._closeMenuIfClickedOutside);
+ if (!document.removeEventListener && document.detachEvent) {
+ document.detachEvent('onclick', this._closeMenuIfClickedOutside);
+ } else {
+ document.removeEventListener('click', this._closeMenuIfClickedOutside);
+ }
};
},