Bug 24403 - When Inspector is docked, selection cause the page to scroll
Summary: When Inspector is docked, selection cause the page to scroll
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Timothy Hatcher
Keywords: InRadar
: 29208 31735 33845 (view as bug list)
Depends on:
Reported: 2009-03-05 14:27 PST by Joseph Pecoraro
Modified: 2010-01-20 11:10 PST (History)
12 users (show)

See Also:

Screenshot demonstrating erratic scroll behavior with pull-down menus. (178.59 KB, image/png)
2009-11-09 17:35 PST, Dave Land
no flags Details
Proposed Patch (3.63 KB, patch)
2010-01-19 23:29 PST, Timothy Hatcher
sullivan: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2009-03-05 14:27:12 PST
When the Web Inspector is open, when attempting to highlight/select text (or anything) on the original webpage.

Steps to Reproduce:
1. Go to: http://www.google.com/search?&q=test (or any page where scrolling would be noticeable)
2. Open the Web Inspector (⌥⌘I)
3. Click and Drag on the Google Results to select some content. (at this point the page should start scrolling uncontrollably).
4. If you close the Web Inspector you can select content normally.

Just clicking and holding does nothing.  However, once you click and drag, moving a single pixel, the uncontrollable scrolling starts.

This is just an annoyance that I didn't see mentioned in other bug reports.
Comment 1 Patrick Mueller 2009-03-20 07:36:20 PDT
I'm unable to reproduce this on r41844 on a Mac.  I wonder if there are some other conditions that need to be made to get this to happen.  Any other thoughts?
Comment 2 Joseph Pecoraro 2009-03-20 08:04:22 PDT
Video Demo of Text Selection Uncontrolled Scolling with Inspector Open:

Video Demo of Typing in Textarea and Uncontrolled Scrolling with Inspector Open:

Clarify Text Selection:
I should be more clear.  Double Click Text Selection is fine, its only "click and drag" selection that seems to produce the problem.

Maybe, with the two different video demos I have these should be 2 bugs or this 1 should be renamed to "Unexpected (and Uncontrollable) Scrolling Behavior when Web Inspector is Open."
Comment 3 Joseph Pecoraro 2009-03-20 08:07:29 PDT
This only happens when the Web Inspector is docked.
Comment 4 Patrick Mueller 2009-03-20 08:35:43 PDT
Yup, was just going to say, works fine when undocked, reproduceable when docked.
Comment 5 Timothy Hatcher 2009-04-06 10:11:17 PDT
This happens while docked because the Web Inspector is a WebView inside another WebView with the WebFrameView of the main page at a shorter size.
Comment 6 Timothy Hatcher 2009-09-11 17:40:44 PDT
*** Bug 29208 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Kahn 2009-10-14 06:51:34 PDT
This is a very troublesome bug for me. It actually makes the Web Inspector a lot less useful for certain kinds of testing/development. 

For example, I'm testing a form that submits using AJAX. So I would like to enter some values in the form's fields, click submit, and read my debug messages in the console. But entering any text in a form field, or tabbing to the next field causes the browser to scroll to the bottom of the page, obscuring the field I am focused in. I can type, but I can't see the field anymore. 

So for this I either have to use Firefox with Firebug, or close and open the Web Inspector before and after each form submission. I'd prefer to just leave the Inspector open all the time.

If it were up to me I'd raise this up to 'Normal' importance.
Comment 8 Brian Weinstein 2009-11-04 17:26:38 PST
This looks to be a Mac only bug, doesn't reproduce on Windows.
Comment 9 Dave Land 2009-11-09 17:35:08 PST
Created attachment 42814 [details]
Screenshot demonstrating erratic scroll behavior with pull-down menus.

Also occurs when a pull-down menu (such as a SELECT element) is activated when the inspector is open.

To reproduce:

1) Go to Google Language Tools
2) Open the Inspector
3) Click the "My Language:" pull-down under the "Search for:" box
4) Observe out-of-control scrolling (including display of the expanded pull-down menu above the top of the screen, as shown)
Comment 10 Timothy Hatcher 2009-12-04 09:50:18 PST
*** Bug 31735 has been marked as a duplicate of this bug. ***
Comment 11 Timothy Hatcher 2009-12-04 09:50:55 PST
Comment 12 Timothy Hatcher 2010-01-19 08:50:16 PST
*** Bug 33845 has been marked as a duplicate of this bug. ***
Comment 13 Timothy Hatcher 2010-01-19 20:20:37 PST
I have a fix I am testing.
Comment 14 Timothy Hatcher 2010-01-19 23:29:26 PST
This regressed with r44379, a change Darin made for viewless WebKit.


The scrollRect.move(scrollView->scrollOffset()); call to convert the rect assumes the frame view is the same size as the WebView. Using the NSView convertRect:fromView: fixes it. But I think we also do a reducdant scroll here, since WebCore already scrolls the main frame.

Patch forthcoming.
Comment 15 Timothy Hatcher 2010-01-19 23:29:43 PST
Created attachment 46983 [details]
Proposed Patch

I'd like Darin or Hyatt to review this, since they touched this code in the past.
Comment 16 Timothy Hatcher 2010-01-19 23:31:43 PST
I meant a "a redundant scroll".
Comment 17 Darin Adler 2010-01-19 23:35:37 PST
Comment on attachment 46983 [details]
Proposed Patch

Why did you dump the _usesDocumentViews code path?
Comment 18 Darin Adler 2010-01-19 23:36:36 PST
Comment on attachment 46983 [details]
Proposed Patch

Oh, OK. I read the comments. I'll try to review tomorrow if no one has looked at it by now.
Comment 19 Darin Adler 2010-01-20 08:12:33 PST
Comment on attachment 46983 [details]
Proposed Patch

OK, seems fine to me too.
Comment 20 Timothy Hatcher 2010-01-20 11:10:03 PST
Landed in r53556.