Browse files

fix for broken test

  • Loading branch information...
1 parent 2e5687b commit 9bcd3cf5e86c70d222eb4c7d66bc0d0513669243 @alaaibrahim committed Feb 20, 2014
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/editor/js/editor-selection.js
View
7 src/editor/js/editor-selection.js
@@ -902,7 +902,10 @@
node = Y.Node.getDOMNode(node);
var range = this.createRange();
if (range.selectNode) {
- range.selectNode(node);
+ try {
+ range.selectNode(node);
+ } catch (err) {
+ }
this._selection.removeAllRanges();
this._selection.addRange(range);
if (collapse) {
@@ -941,7 +944,7 @@
* @return {Node}
*/
getCursor: function() {
- return Y.EditorSelection.ROOT.all('.yui-cursor, #' + Y.EditorSelection.CURID);
+ return Y.EditorSelection.ROOT.all('.' + Y.EditorSelection.CURID);
},
/**
* Remove the cursor placeholder from the DOM.

0 comments on commit 9bcd3cf

Please sign in to comment.