Permalink
Browse files

IE9 implements getSelection, so we can build on the native version

  • Loading branch information...
1 parent f90012c commit 90909777cb2c6cf69505fbb1d8b6f9d9c6ee9925 @jamis jamis committed Dec 14, 2011
Showing with 3 additions and 1 deletion.
  1. +2 −0 src/wysihat/dom/ierange.js
  2. +1 −1 src/wysihat/dom/selection.js
@@ -446,4 +446,6 @@ if (!window.getSelection) {
var selection = new Selection(document);
return function() { return selection; };
})();
+
+ window.getSelection.custom = true;
}
@@ -1,7 +1,7 @@
//= require "./ierange"
//= require "./range"
-if (Prototype.Browser.IE) {
+if (window.getSelection.custom) {
Object.extend(Selection.prototype, (function() {
// TODO: More robust getNode
function getNode() {

0 comments on commit 9090977

Please sign in to comment.