admin管理员组

文章数量:1317123

I have been noticing this warning and error message in my console after updating Chrome to 36.0.1985.125.

Warning:

'Range.detach' is now a no-op, as per DOM (). 

Error:

Discontiguous selection is not supported.

Can be seen: .html

Other javascript/jquery plugins (wysihtml5, rangy) have also been affected, any solutions?

I have been noticing this warning and error message in my console after updating Chrome to 36.0.1985.125.

Warning:

'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg/#dom-range-detach). 

Error:

Discontiguous selection is not supported.

Can be seen: http://rangy.googlecode./svn/trunk/demos/cssclassapplier.html

Other javascript/jquery plugins (wysihtml5, rangy) have also been affected, any solutions?

Share Improve this question edited Jul 29, 2014 at 17:15 Chandrew asked Jul 29, 2014 at 16:52 ChandrewChandrew 17.3k4 gold badges25 silver badges40 bronze badges 3
  • Remove calls to Range.detach. Also, that’s probably a warning, not an error. – Ry- Commented Jul 29, 2014 at 16:54
  • Rangy was fixed with this mit. – esqew Commented Jul 29, 2014 at 16:57
  • @esqew Interesting, I gave rangy an update. In his ments, looks like the error cannot be suppressed '// Next line causes Chrome 36 to print a console error of' ... (code.google./p/chromium/issues/detail?id=353069#c4) – Chandrew Commented Jul 29, 2014 at 17:13
Add a ment  | 

1 Answer 1

Reset to default 5

I'm still trying to decide what to do about this. See this Rangy issue (migration to GitHub not quite plete, sorry). I think it's unhelpful behaviour on the part of Chrome and would like it removed.

The offending code in Rangy is in a feature test that determines whether the browser supports multiple ranges within a selection (of the current mainstream browsers, only Firefox does). Since this doesn't seem to be going away I think I'm going to have to suck it up and add a browser sniff, which makes me sad.

Update

I added a horrible browser sniff to Rangy and the error no longer appears.

本文标签: javascript39Rangedetach39 is now a noopas per DOMStack Overflow