Closed Bug 914251 Opened 11 years ago Closed 11 years ago

Autoscroll does not work properly in certain case

Categories

(Toolkit :: XUL Widgets, defect)

10 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26
Tracking Status
firefox22 --- affected
firefox23 --- affected
firefox24 --- affected
firefox25 --- affected
firefox26 --- fixed
firefox-esr17 --- affected

People

(Reporter: alice0775, Assigned: Swatinem)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached file sample html (deleted) —
Build Identifier: http://hg.mozilla.org/mozilla-central/rev/c7cc85e13f7a Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130909030204 I noticed the problem when I test Bug 914143. Autoscroll does not work properly. html, body { width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll; } breaks autoscroll. Steps To Reproduce: 1. Enable autoscroll from preferences if necessary 2. Open attached sample html 3. Attempt to autoscroll Actual Results: Inner scroll box(body) is not scrolled Expected Results: Inner scroll box(body) should be scrolled when outer scroll box touched the top/bottom
Regression window(m-c) Good: http://hg.mozilla.org/mozilla-central/rev/2afc252b4d39 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111021 Firefox/10.0a1 ID:20111021031012 Bad: http://hg.mozilla.org/mozilla-central/rev/edcd50167446 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111021 Firefox/10.0a1 ID:20111021010155 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2afc252b4d39&tochange=edcd50167446 Regression window(m-i) Good: http://hg.mozilla.org/integration/mozilla-inbound/rev/0cec1d2a0705 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111019 Firefox/10.0a1 ID:20111020010054 Bad: http://hg.mozilla.org/integration/mozilla-inbound/rev/1e67f08f9a08 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111018 Firefox/10.0a1 ID:20111020015053 Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=0cec1d2a0705&tochange=1e67f08f9a08 Regressed by: 1e67f08f9a08 Arpad Borsos — Bug 695121 - Auto scroll does not work on https://beta.mozillalabs.com/en-US/; r=neil@parkwaycc.co.uk
Blocks: 695121
Keywords: regression
Version: Trunk → 10 Branch
Been a long time :-D So it does scroll the outer html instead of the body, because it falls back to window based scrolling, which as i notice also ignores the overflow hidden and is able to scroll both directions. Neil: how do you think would be the best way to work around Bug 695121 Comment 11?
We don't have to, we can switch to the new scrollLeft/TopMax API introduced by bug 766937, so we shouldn't have to worry about anything like that.
As far as I read it, thats only a getter. The original issue was with setting .scrollTop on <body>. I can take a look, but might need some more time to get into that stuff again. So feel free to take this bug.
(In reply to Arpad Borsos from comment #4) > As far as I read it, thats only a getter. The original issue was with > setting .scrollTop on <body>. The original issue was that we thought <body> was scrollable when it wasn't. With the new API we can be really sure whether <body> (and presumably <html>) is scrollable.
Attached patch lefttopmax.patch (deleted) — Splinter Review
This was easy enough. Took me more time to figure out how to run tests for <html> and <body> elements. If you don’t like how the test snippets and the test cases themselves are interleaved, I can make it clearer by separating it further.
Assignee: nobody → arpad.borsos
Status: NEW → ASSIGNED
Attachment #802927 - Flags: review?(neil)
Attachment #802927 - Flags: review?(neil) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
It's not scrolling the outer box for me.
(In reply to Guilherme Lima from comment #9) > It's not scrolling the outer box for me. The attached testcase is scrolling the inner box, like its supposed to. When you activate autoscroll in the outer boxes padding (outside the inner box), its scrolling the outer one. What are you seeing exactly?
I'm trying to get the Expected Results: "Inner scroll box(body) should be scrolled when outer scroll box touched the top/bottom". On Firefox 24 only the outer one scrolls. On Nightly with the patch only the inner one scrolls (the outer one doesn't scroll after the inner hits top/bottom). On Chrome 29 I get the expected results (test it just to confirm that what I was understanding was correct).
(In reply to Alice0775 White from comment #0) > Expected Results: > Inner scroll box(body) should be scrolled when outer scroll box touched the top/bottom Sorry, The expected is wrong. Corrct expected results is _Outer_ scroll box(html) should be scrolled when _inner_ scroll box touched the top/bottom. The behavior should be like overflowed textarea in this page.
Yeah, well, I don't know how, but I got the right idea (and what happens on Chrome).
And I confirmed that latest Nightly works as expected with the attachment 801645 [details]. http://hg.mozilla.org/mozilla-central/rev/53d5e43e23cc Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130914030203
(In reply to Alice0775 White from comment #14) > And I confirmed that latest Nightly works as expected with the attachment > 801645 [details]. > > http://hg.mozilla.org/mozilla-central/rev/53d5e43e23cc > Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 > ID:20130914030203 Err, please ignore this comment#14. It does not work as expected. http://hg.mozilla.org/mozilla-central/rev/53d5e43e23cc Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130914030203 I will file a new bug.
I've filed Bug 916475
Depends on: 916475
(In reply to Alice0775 White) > Actual Results: > Inner scroll box(body) is not scrolled > > Expected Results: > Inner scroll box(body) should be scrolled when outer scroll box touched the > top/bottom I don't remember autoscroll ever having done this in the case of nested scrollable areas, instead it has only ever scrolled the innermost area. Maybe you are being confused by the wheel scroll code, which did get enhanced to search for an outer scrollable area when the inner one reached the end.
(In reply to neil@parkwaycc.co.uk from comment #17) > (In reply to Alice0775 White) > > Actual Results: > > Inner scroll box(body) is not scrolled > > > > Expected Results: > > Inner scroll box(body) should be scrolled when outer scroll box touched the > > top/bottom > > I don't remember autoscroll ever having done this in the case of nested > scrollable areas, instead it has only ever scrolled the innermost area. > > Maybe you are being confused by the wheel scroll code, which did get > enhanced to search for an outer scrollable area when the inner one reached > the end. Oops, yes, I am confused. But in the case of comment#0, I think outer scroll box should be scrolled because last line of the content is cut off....
Anyway, I verified this was fixed. The behaver is same as Firefox9 and before. http://hg.mozilla.org/mozilla-central/rev/53d5e43e23cc Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130914030203 http://hg.mozilla.org/releases/mozilla-release/rev/c4405d7a95f6 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 ID:20111220165912
No longer depends on: 916475
(In reply to neil@parkwaycc.co.uk from comment #17) > (In reply to Alice0775 White) > > Actual Results: > > Inner scroll box(body) is not scrolled > > > > Expected Results: > > Inner scroll box(body) should be scrolled when outer scroll box touched the > > top/bottom > > I don't remember autoscroll ever having done this in the case of nested > scrollable areas, instead it has only ever scrolled the innermost area. > > Maybe you are being confused by the wheel scroll code, which did get > enhanced to search for an outer scrollable area when the inner one reached > the end. While it might be desirable that autoscroll works in line with wheel scroll, I don’t think changing the semantics of autoscroll makes sense at all. At activation time, the users intended direction is not known, so we can’t just go up to the outer scrollable depending on if we are at one of the edges. Changing the target dynamically when an edge is reached also makes no sense, it would just be confusing from a users perspective.
Depends on: 962249
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: