Bug 94739 - Changing innerHTML removes selection when right clicking on an editable region
Summary: Changing innerHTML removes selection when right clicking on an editable region
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2012-08-22 11:54 PDT by Ryosuke Niwa
Modified: 2013-02-03 14:05 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2012-08-22 11:54:50 PDT
Reproduction steps:
1. Go to http://jsfiddle.net/ruBxs/10/
2. Right click on "edit me..." (it needs to be on the text)
3. Observe that the caret is not placed in the editable element when you close the context menu.
Comment 1 Ojan Vafai 2012-08-22 12:04:35 PDT
On which platforms? This is affected by EditingBehavior, bool shouldSelectOnContextualMenuClick() const { return m_type == EditingMacBehavior; }.
Comment 2 Ojan Vafai 2012-08-22 12:05:33 PDT
Or is this cross-platform?
Comment 3 Ryosuke Niwa 2012-08-22 12:07:07 PDT
(In reply to comment #2)
> Or is this cross-platform?

It reproduces on Mac at least. Not sure about other platforms.
Comment 4 Ojan Vafai 2012-08-22 12:09:22 PDT
Works for me on Chromium Linux dev channel.
Comment 5 Ryosuke Niwa 2013-02-03 14:05:21 PST
It works on nightly build of webkit as well.