Closed Bug 1123422 Opened 5 years ago Closed 4 years ago

Selecting text rarely works the first time after drag scrolling the page

Categories

(Core :: General, defect)

37 Branch
x86_64
Windows 7
defect
Not set
Points:
2

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
e10s m7+ ---
firefox41 --- fixed

People

(Reporter: raysatiro, Assigned: enndeakin)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150118030202

Steps to reproduce:

I often will select text in a webpage. For example my e-mails in yahoo webmail. Rarely it has happened that when I click and drag the first time over some text isn't selected. When I click and drag the second time over the same text it will be selected.


Actual results:

See above. This could be my mouse going but I'm filing here in case there is someone with a similar problem. I haven't had this happen to me outside of Nightly. I'm using e10s primarily.

Does Nightly have some sort of debug log I can enable to see what mouse messages were received so I can see if the click is actually being picked up by the tab?


Expected results:

The text should be selected on the first drag.
Did you try this on a clean-ish profile, and does it happens there, too?
tracking-e10s: --- → ?
Flags: needinfo?(raysatiro)
Product: Firefox → Core
(In reply to :Gijs Kruitbosch from comment #1)
> Did you try this on a clean-ish profile, and does it happens there, too?

It happens rarely so I don't think I'll be able to reproduce there. I do not have any extensions enabled in this profile at all. Plugins only flash which is set ask to activate.
Flags: needinfo?(raysatiro)
(In reply to Ray Satiro from comment #2)
> Plugins only flash which is set ask to activate.

Correction, I also have the OpenH264 plugin which is set to always activate.
Flags: needinfo?(lhenry)
I tried some text selecting (dragging with the cursor) in Nightly with e10s on and off. I haven't been able to reproduce this. 

Ray, if you have clear steps to reproduce the issue, please let us know!
Flags: needinfo?(lhenry)
Flags: needinfo?(raysatiro)
I still have this issue every once in a while. Do you have any ideas of what I can do to help diagnose? Thanks
Flags: needinfo?(raysatiro)
Ok I have a repro. Here is the problem. Selecting text after using the middle mouse button to scroll down the page doesn't work. Go here:
http://www.theatlantic.com/features/archive/2015/02/what-isis-really-wants/384980/
Press the middle mouse button and move the mouse to scroll down the page. Now press the middle mouse button again to release the scroll. Now try to select some text. Nothing will be selected.
Reproducible e10s windows only.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:38.0) Gecko/20100101 Firefox/38.0
gecko.buildID = 20150222030206
Blocks: e10s
I can reproduce with the middle-click scroll then try to select text. Focus seems off after drag scrolling shuts down.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Selecting text rarely doesn't work the first time → Selecting text rarely doesn't work the first time after drag scrolling the page
Summary: Selecting text rarely doesn't work the first time after drag scrolling the page → Selecting text rarely works the first time after drag scrolling the page
Assignee: nobody → jmathies
Assignee: jmathies → enndeakin
Attached patch Potential fix (obsolete) — Splinter Review
This is the same issue as 1066663. What happens:

1. Autoscroll moves focus to the chrome window.
2. Closing it and clicking causes focus to move back to the content window. This causes the child to receive a WindowRaised, and the selection drag state is reset.

Another possible fix that I will investigate is to not adjust the focus when autoscroll is turned on.
Points: --- → 2
Duplicate of this bug: 1066663
Comment on attachment 8621152 [details] [diff] [review]
Potential fix

Don't see any issues with this, but am limiting it to the content process. Will work on a test.
Attachment #8621152 - Flags: review?(mats)
Comment on attachment 8621152 [details] [diff] [review]
Potential fix

I don't know what this block is trying to do in the first place.
Is it just an old wallpaper?  Why can't we just remove it?

Sorry, but I think you want someone who understands e10s and
the current focus management code to review this.

(In reply to Neil Deakin from comment #8)
> This is the same issue as 1066663. What happens:
> 
> 1. Autoscroll moves focus to the chrome window.

That seems like the real bug to me.
Attachment #8621152 - Flags: review?(mats)
OK, when I tried it earlier it didn't work, but, this does in fact work.

A test for this will be added as part of bug 1131626.
Attachment #8621152 - Attachment is obsolete: true
Attachment #8624467 - Flags: review?(dao)
Attachment #8624467 - Flags: review?(dao) → review+
https://hg.mozilla.org/mozilla-central/rev/24fa5a522093
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1396608
Moving from Core::Untriaged to Core::General https://bugzilla.mozilla.org/show_bug.cgi?id=1407598
Component: Untriaged → General
You need to log in before you can comment on or make changes to this bug.