Closed Bug 1248128 Opened 9 years ago Closed 9 years ago

unnecessary scrolling when move caret by press arrow key

Categories

(Core :: Layout, defect)

Unspecified
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla47
Tracking Status
firefox44 --- unaffected
firefox45 + verified
firefox46 + verified
firefox47 + verified

People

(Reporter: alice0775, Assigned: jfkthame)

References

(Depends on 2 open bugs)

Details

(Keywords: platform-parity, regression)

Attachments

(4 files, 1 obsolete file)

[Tracking Requested - why for this release]: view rendering error

When I test Bug 1248125, I found a problem.

Steps To Reproduce:
0. Create new profile and launch Firefox
1. Open http://czat.wp.pl/i,30494,chat.html
2. Make narrow browser width to approx. 700px so that horizontal scrollbar appears
3. Click input field of "Nick tymczasowy:"
4. Press left arrow key

Actual Results:
Root element is suddenly scroll horizontally

Expected Results:
Should not scroll

Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=fc4fd9433e216058359c5337cb86b131e55ee63b&tochange=c206ee0a4809e515294aee998fa0b249a7fe1a16
Flags: needinfo?(jfkthame)
Component: Layout: Block and Inline → Layout
Attached file semi reduced html
This reproduces on Windows, but not on OS X, afaict; probably related to differences between how key events are mapped to selection-movement commands on the platforms.

I guess the event is being propagated up to the root element when there's nowhere for the caret to move left within the editable element.
Flags: needinfo?(jfkthame)
The problem is not only horizontal scroll but also vertical.

Steps To Reproduce:
1. Open attachment 8719148 [details] index.html
2. Shrink browser height so that vertical scrollbar appears
3. Scroll up
4. Click input field of "Nick tymczasowy:"
5. Press left arrow key

Actual Results:
Root element is suddenly scroll vertically
I can also reproduce on Ubuntu14.04 Nightly47.0a1 as well as on Windows7.
Keywords: pp
OS: Unspecified → All
Attachment #8719151 - Attachment description: index.html (minimum) → testcase.html (minimum)
This should avoid the problem, while still fixing the original issue. Try build: https://treeherder.mozilla.org/#/jobs?repo=try&revision=103b51314efc.
Attachment #8719155 - Flags: review?(roc)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8719155 [details] [diff] [review]
The fallback caret-move handling from bug 1153237 should be more selective to avoid undesired side-effects

Review of attachment 8719155 [details] [diff] [review]:
-----------------------------------------------------------------

Needs a test
Attachment #8719155 - Flags: review?(roc) → review+
This is a better version of the patch, and also fixes the slightly different example in bug 1248185.
Attachment #8719530 - Flags: review?(roc)
Attachment #8719155 - Attachment is obsolete: true
Testcase that fails on current trunk due to this bug; passes after the patch above.
Attachment #8719531 - Flags: review?(roc)
Tracking to make sure that we have a fix in 45.
https://hg.mozilla.org/integration/mozilla-inbound/rev/12fb5bc313d7d9ffaf570db7238c95d4f0ed873b
Bug 1248128 - The fallback caret-move handling from bug 1153237 should be more selective to avoid undesired side-effects. r=roc

https://hg.mozilla.org/integration/mozilla-inbound/rev/c44734ba6500fca79424cf1f2d397162bbb55127
Bug 1248128 - Test for spurious propagation of failed selection-move command to the root, causing unwanted scrolling. r=roc
Comment on attachment 8719530 [details] [diff] [review]
The fallback caret-move handling from bug 1153237 should be more selective to avoid undesired side-effects

Approval Request Comment
[Feature/regressing bug #]: bug 1153237 (which in turn was fixing a regression from bug 1077515)

[User impact if declined]: incorrect behavior (unwanted scrolling of the window, or incorrect caret movement) in response to arrow-keys in editable text in certain edge conditions

[Describe test coverage new/current, TreeHerder]: existing selection/editing tests continue to pass (but didn't catch this regression); new mochitests for the regression here and in bug 1248185 landed along with the patch

[Risks and why]: low risk -- very localized change making the fix from bug 1153237 more narrowly-focused and precise in its effect

[String/UUID change made/needed]: n/a
Attachment #8719530 - Flags: approval-mozilla-beta?
Attachment #8719530 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/12fb5bc313d7
https://hg.mozilla.org/mozilla-central/rev/c44734ba6500
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Comment on attachment 8719530 [details] [diff] [review]
The fallback caret-move handling from bug 1153237 should be more selective to avoid undesired side-effects

Fix a regression, taking it.
Should be in 45 beta 7
Attachment #8719530 - Flags: approval-mozilla-beta?
Attachment #8719530 - Flags: approval-mozilla-beta+
Attachment #8719530 - Flags: approval-mozilla-aurora?
Attachment #8719530 - Flags: approval-mozilla-aurora+
Depends on: 1249444
QA Whiteboard: [good first verify]
I have reproduced this bug on Firefox nightly 44.0a1  on windows(64bit).
Successfully Reproduced this bug with Firefox Nightly 47.0a1 (2016-02-13) ;(Build ID: 20160213030210) on Linux, 64 Bit with the instructions from comment 0 and comment 3.

This Bug is now verified as fixed on Latest Firefox Beta 45.0b7 (Build ID: 20160218171844)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 ; 

Latest Firefox Developer Edition 46.0a2 (2016-02-20) ; (Build ID: 20160220004011)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 and

Latest Firefox Nightly 47.0a1 (2016-02-20) ; (Build ID: 20160220030407)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
QA Whiteboard: [good first verify] → [good first verify][testday-20160219]
I have reproduced this bug with Firefox nightly 47.0a1(build id:20160213030210)on 
windows 7(64 bit)

I have verified this bug as fixed with Firefox aurora 46.0a2(build id:20160304004008)
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0

[testday-20160304]
I have reproduced this bug with Firefox Nightly 47.0a1 (Build ID: 20160213030210) on 
windows 8.1, 64-bit with the instructions from comment 0.

Verified as fixed with Firefox Release 45.0.1 (Build ID: 20160315153207)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

Verified as fixed with Firefox beta 46.0b2 (Build ID: 20160314144540)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0

Verified as fixed with Firefox Developer edition 47.0a2 (Build ID: 20160321004046)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

As this bug is verified on Linux (Comment 18), I am marking this as verified!
Status: RESOLVED → VERIFIED
QA Whiteboard: [good first verify][testday-20160219] → [good first verify][testday-20160219][bugday-20160316]
Depends on: 1328026
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: