Bug 67464 - Invalid selection made temporarily when entering text in textfield
Summary: Invalid selection made temporarily when entering text in textfield
Status: RESOLVED DUPLICATE of bug 62092
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Varun Jain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 21:24 PDT by Sadrul Habib Chowdhury
Modified: 2013-02-04 11:33 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sadrul Habib Chowdhury 2011-09-01 21:24:54 PDT
Reproduction steps:

 * Enter some text in a textfield.
 * Press 'Home' to go to the beginning of the textfield.
 * Press any key to insert some text.

FrameSelection::selection becomes invalid, because it returns true from isRange() in WebCore::EditorClient::respondToChangedSelection callback.

The following comment for VisibleSelection::setWithoutValidation may be of interest (or maybe not):

// FIXME: This function breaks the invariant of this class.
// But because we use VisibleSelection to store values in editing commands for use when
// undoing the command, we need to be able to create a selection that while currently
// invalid, will be valid once the changes are undone. This is a design problem.
// To fix it we either need to change the invariants of VisibleSelection or create a new
// class for editing to use that can manipulate selections that are not currently valid.
Comment 1 Robert Kroeger 2011-09-02 07:28:02 PDT
Varun: I think you ought to take a look at this eventually.
Comment 2 Ryosuke Niwa 2011-09-08 15:11:38 PDT
Also see https://bugs.webkit.org/show_bug.cgi?id=62092.
Comment 3 Ryosuke Niwa 2013-02-03 14:16:53 PST
I think we've fixed this bug in the latest WebKit. Could you check that?
Comment 4 Varun Jain 2013-02-04 11:06:53 PST
(In reply to comment #3)
> I think we've fixed this bug in the latest WebKit. Could you check that?

yes.. I dont see this anymore.
Comment 5 Ryosuke Niwa 2013-02-04 11:33:52 PST

*** This bug has been marked as a duplicate of bug 62092 ***