Pressing Backspace when typing a reply on steamcommunity.com forums causes page to scroll up
Categories
(Core :: Layout: Scrolling and Overflow, defect, P3)
Tracking
()
People
(Reporter: choinnn1, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
- Be logged in on steamcommunity.com.
- Open any forum thread with enough replies where you can type your own reply.
- Start typing. Try removing what you typed with Backspace.
Actual results:
Page scrolling up when pressing Backspace to remove typed text.
Expected results:
Page should not scroll on pressing Backspace.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Panning and Zooming' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•2 years ago
|
||
This may be somewhat related to bug 1674687 and bug 1774315.
There's a keyup event handler doing;
OnTextInput: function()
{
var iScrollOffset = undefined;
var cNewLength = this.m_elTextArea.value.length;
// we delay this until first input as some values get reported incorrectly if the element isn't visible.
if ( this.m_nTextAreaPadding === null && $J(this.m_elTextArea ).is(':visible') )
this.CalculatePadding();
// force a resize
if ( cNewLength < this.m_cEntryLength )
{
// when we shrink this box, we might scroll the window. Remember where we are so we can jump back
iScrollOffset = window.scrollY;
this.m_elTextArea.style.height = this.m_nMinHeight + 'px';
}
if ( this.m_elTextArea.scrollHeight > this.m_nMaxHeight )
{
this.m_elTextArea.style.height = this.m_nMaxHeight + 'px';
this.m_elTextArea.style.overflow = 'auto';
}
else if ( this.m_elTextArea.scrollHeight != this.m_elTextArea.getHeight() )
{
var nHeight = Math.max( this.m_elTextArea.scrollHeight, this.m_nMinHeight );
this.m_elTextArea.style.height = ( nHeight - this.m_nTextAreaPadding ) + 'px';
if ( this.m_elTextArea.style.overflow == 'auto' )
this.m_elTextArea.style.overflow = 'hidden';
}
if ( this.m_fnChangeCallback )
this.m_fnChangeCallback( this.m_elTextArea );
if ( iScrollOffset )
window.scrollTo( window.scrollX, iScrollOffset );
this.m_cEntryLength = cNewLength;
}
So it does basically window.scrollTo(window.scrollX, window.scrollY)
Comment 4•2 years ago
|
||
Setting as S2/P2 based on the similar bug 1768330
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Emilio thinks this might be a version of (or helped by) bug 1674687.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Downgrading P3:S3 since the issue is different from bug 1768330. Bug 1768330 caused jumpy scrolling, rather this bug causes just 1px jittering.
Updated•2 years ago
|
Comment 8•5 months ago
|
||
I can't reproduce this issue on the latest nightly. I am not sure whether the site has changed or not, though.
choinn, feel free to reopen this bug if you can still see this bug on nightlies which have the change for bug 1674687. Thanks.
Description
•