Skip to content

Commit

Permalink
IE9 implements getSelection, so we can build on the native version
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Dec 14, 2011
1 parent f90012c commit 9090977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/wysihat/dom/ierange.js
Expand Up @@ -446,4 +446,6 @@ if (!window.getSelection) {
var selection = new Selection(document);
return function() { return selection; };
})();

window.getSelection.custom = true;
}
2 changes: 1 addition & 1 deletion src/wysihat/dom/selection.js
@@ -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() {
Expand Down

0 comments on commit 9090977

Please sign in to comment.