[text selection] Close the text dialog when the focused content gets blur

RESOLVED FIXED in mozilla37

Status

()

Core
Selection
P2
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: pchang, Assigned: pchang)

Tracking

Trunk
mozilla37
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 5 obsolete attachments)

(Assignee)

Description

3 years ago
This is a defect of the selectionstatechanged event dispatch logic, need to handle the 'blur' case in BrowserElementChildPreload.js
(Assignee)

Updated

3 years ago
Blocks: 1023688
(Assignee)

Updated

3 years ago
Assignee: nobody → pchang
(Assignee)

Comment 1

3 years ago
Created attachment 8536455 [details] [diff] [review]
dispath blur event to text dialog

Ehsan, right now the selectionstatechanged event dispatch logic is in BrowserElementChildPreload.js (modified by bug 1090008). 

This patch will always dispatch the blur event to text dialog. Later I will add the test case for the blur.
Attachment #8536455 - Flags: review?(ehsan.akhgari)

Updated

3 years ago
Attachment #8536455 - Flags: review?(ehsan.akhgari) → review+
(Assignee)

Comment 2

3 years ago
Created attachment 8537103 [details] [diff] [review]
bug-1111433-test.patch

add the mochitest
Attachment #8537103 - Flags: review?(ehsan.akhgari)

Updated

3 years ago
Attachment #8537103 - Flags: review?(ehsan.akhgari) → review+
(Assignee)

Updated

3 years ago
Priority: -- → P2
(Assignee)

Comment 3

3 years ago
Created attachment 8538222 [details] [diff] [review]
v2 mochitest

Set the usecapture as true for RemoveEventListener
Attachment #8537103 - Attachment is obsolete: true
Attachment #8538222 - Flags: review+
(Assignee)

Comment 4

3 years ago
(In reply to peter chang[:pchang][:peter] from comment #3)
> Created attachment 8538222 [details] [diff] [review]
> v2 mochitest
> 
> Set the usecapture as true for RemoveEventListener

Hit the crash for b2g desktop mochitest, create bug 1113524 to fix the crash.

https://tbpl.mozilla.org/?tree=Try&rev=8ced49e7387a
(Assignee)

Updated

3 years ago
Depends on: 1113524
(Assignee)

Comment 5

3 years ago
Created attachment 8539251 [details] [diff] [review]
v2 dispath blur event to text dialog

rebase
Attachment #8536455 - Attachment is obsolete: true
Attachment #8539251 - Flags: review+
(Assignee)

Comment 6

3 years ago
Created attachment 8539253 [details] [diff] [review]
v3 mochitest

Modify because bug 1109800 changes the timing to trigger blur event in focusManager.
Attachment #8538222 - Attachment is obsolete: true
Attachment #8539253 - Flags: review+
(Assignee)

Updated

3 years ago
Depends on: 1109800
(Assignee)

Comment 7

3 years ago
Try result is positive, wait for bug 1109800 and 1113524.
(Assignee)

Comment 8

3 years ago
Created attachment 8545124 [details] [diff] [review]
v3 dispath blur event to text dialog

As mentioned in bug 1113524 comment 17, checking '_isContentWindowCreated' before sending out the SelectionStateChanged event.
Attachment #8539251 - Attachment is obsolete: true
Attachment #8545124 - Flags: review+
(Assignee)

Comment 9

3 years ago
Created attachment 8545727 [details] [diff] [review]
v4 mochitest for blur

Fix the CopyPaste mochitest and disable b2g SelectionStateBlur mochitest because of bug 1097419. Will fire a follow-up bug to enable SelectionStateBlur mochitest on b2g.
Attachment #8539253 - Attachment is obsolete: true
Attachment #8545727 - Flags: review+
(Assignee)

Comment 10

3 years ago
Try server is positive.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=66c733bc3cb5
Keywords: checkin-needed
(Assignee)

Updated

3 years ago
No longer depends on: 1113524
https://hg.mozilla.org/mozilla-central/rev/0257f42048f3
https://hg.mozilla.org/mozilla-central/rev/40f4f285ea0c
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.