Bug 33448 - webkit clears the current selection when click the address bar or search box
Summary: webkit clears the current selection when click the address bar or search box
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 04:57 PST by wxu
Modified: 2014-03-12 04:25 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wxu 2010-01-10 04:57:35 PST
webkit clears the current selection when click the address bar or search box, it works fine under chrome, firefox, and safari on windows


steps to reproduce:
1. open safari and browse to a editable html file which body has attribute  contentEditable="true"
2. select some text
3. click address bar or search box
4. the selection of html has been cleared

it happens on safari, and webkit which I embed in a wxWidgets application using wxWebkitCtrl, I'm not sure if this is a bug or it's by design.

or is there any work around to avoid this?


os: mac osx 10.5
safari: 4.x
Comment 1 Alexey Proskuryakov 2010-01-11 17:09:29 PST
This behavior seems correct to me - a single window shouldn't have multiple selections.
Comment 2 wxu 2010-01-11 17:27:47 PST
What I'm trying to do is embed the webkit in a desktop application(using wxwidgets), and then I added dialogs and other property editor to maintain the current selection(e.g. image, paragraph).
If the user selected an image, I want to show an image editor beside the html view, then user can change the size or other style of the image.

but if I click the editor(outside of the html view), then the current selection lost, what I expected is make the selection to be inactive, then I can got the selected element.

is that make sense?
thanks.
Comment 3 Sudarshan C P 2014-03-12 04:25:32 PDT
I understood your requirement saying that after image selection, your going to invoke the image editor, for modifying  the size/style of image, but one thing is that if your editor is part of same window handler where engine and UI interface handle the touch event,then touch co-ordinates send to engine for doing set Selection with respect to touch point, hence as Alexey Proskuryakov mentioned window shouldn't have multiple selections, so this an expected behavior,i think this is an invalid case.
Suggestion is that make different touch handler for both the entity.