Summary: | selection.modify() should throw an exception if the selection does not have a range or is detached | ||
---|---|---|---|
Product: | WebKit | Reporter: | Justin Lebar <justin.lebar+bug> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | ap, ishermandom+bugs, justin.lebar+bug, matspal, mitz, morrita, ojan, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Description
Justin Lebar
2010-01-11 19:56:11 PST
DOMException INVALID_STATE_ERR is used in HTML5 Selection when there's something wrong with the selection range: http://www.whatwg.org/specs/web-apps/current-work/#selection-0 and in DOM-Level-2-Traversal-Range when using a detached range: http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-idl so INVALID_STATE_ERR seems like the appropriate exception to use here. I don't think we should do that. There is a significant chance that raising an exception where we didn't do that previously will break some pages - and the potential benefit is extremely minor. I agree with Alexey. Throwing an exception at this point will break existing web pages. Does Firefox 4 throws an exception in such cases? FYI, Bug 33509 had similar discussion and concludes not to throw an exception. (In reply to comment #4) > FYI, Bug 33509 had similar discussion and concludes not to throw an exception. Ok. We should close these bugs as invalid. Oops, I meant wontfix. (In reply to comment #3) > I agree with Alexey. Throwing an exception at this point will break existing web pages. Does Firefox 4 throws an exception in such cases? We silently fail. +1 on the WONTFIX. |