This is a defect of the selectionstatechanged event dispatch logic, need to handle the 'blur' case in BrowserElementChildPreload.js
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)
Created attachment 8537103 [details] [diff] [review] bug-1111433-test.patch add the mochitest
Attachment #8537103 - Flags: review?(ehsan.akhgari)
Created attachment 8538222 [details] [diff] [review] v2 mochitest Set the usecapture as true for RemoveEventListener
(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
Created attachment 8539251 [details] [diff] [review] v2 dispath blur event to text dialog rebase
Created attachment 8539253 [details] [diff] [review] v3 mochitest Modify because bug 1109800 changes the timing to trigger blur event in focusManager.
Try result is positive, wait for bug 1109800 and 1113524.
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.
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.
Try server is positive. https://treeherder.mozilla.org/#/jobs?repo=try&revision=66c733bc3cb5
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.