[JIRA] [core] (JENKINS-33891) Unexpected scrolling on job configuration page

1 view
Skip to first unread message

dbeck@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 7:23:03 PM3/29/16
to jenkinsc...@googlegroups.com
Daniel Beck created an issue
 
Jenkins / Bug JENKINS-33891
Unexpected scrolling on job configuration page
Issue Type: Bug Bug
Assignee: gus reiber
Components: core
Created: 2016/Mar/29 11:22 PM
Environment: Build for 2.0 PR 2182 with #4603
Labels: 2.0 2.0-beta 2.0-planned
Priority: Blocker Blocker
Reporter: Daniel Beck

Steps to reproduce:

  • Install recommended plugins
  • Create a freestyle job named 'foo'
  • radiobutton 'Git'
  • Click 'Advanced…' to show Advanced Project Options
  • Check 'This build is parameterized'
  • Add two boolean parameters (no need to specify name or anything)
  • Check 'Retry Count'

Expected result: Retry Count gets checked
Actual result: It does get checked, but the page scrolls down.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 8:01:01 PM3/29/16
to jenkinsc...@googlegroups.com
gus reiber started work on Bug JENKINS-33891
 
Change By: gus reiber
Status: Open In Progress

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 8:02:01 PM3/29/16
to jenkinsc...@googlegroups.com
gus reiber commented on Bug JENKINS-33891
 
Re: Unexpected scrolling on job configuration page

So far cannot reproduce with OSX Chrome Version 49.0.2623.87 (64-bit)

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 8:22:01 PM3/29/16
to jenkinsc...@googlegroups.com

Can reproduce in Firefox... checking against 2.0 source branch.

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 8:28:01 PM3/29/16
to jenkinsc...@googlegroups.com

bug is present in 2.0 as well.... digging around.

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 9:06:01 PM3/29/16
to jenkinsc...@googlegroups.com

http://jenkins.beedemo.net/api-team/job/sandbox/job/hello/configure

This behavior exists in v1. The above steps can be done against the beedemo URL to get the same jumping behavior with FF.

scrollIntoView at ln 1367 of hudson-behavior.js does not correctly calculate the page size after things have been opened, and thus scrolls the window to the wrong spot. The easy fix is just to remove this behavior. Perhaps a better fix would be to fix the math, but I am not convinced that really is the right behavior and I am not sure how best to jump through those hoops, in prototpye.js with who knows how many page shape changing events may happen on the page.

greiber@cloudbees.com (JIRA)

unread,
Mar 29, 2016, 9:22:01 PM3/29/16
to jenkinsc...@googlegroups.com

https://github.com/jenkinsci/jenkins/pull/2193

I have offered a PR that fixes the issue specifically for v2, as I am not sure if it doesn't mostly work enough in v1 that people like it, despite being broken in some cases. I don't think it is worth fixing, but others might think so. Daniel Beck, do as you will....

dbeck@cloudbees.com (JIRA)

unread,
Mar 30, 2016, 4:19:01 AM3/30/16
to jenkinsc...@googlegroups.com

gus reiber It's not useful to link to private Jenkins instances. Not even I know how to access that one (and for the purposes of this issue tracker, I don't want to know).

dbeck@cloudbees.com (JIRA)

unread,
Mar 30, 2016, 6:34:01 PM3/30/16
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
 
Change By: Daniel Beck
Priority: Blocker Critical

dbeck@cloudbees.com (JIRA)

unread,
Mar 30, 2016, 6:46:01 PM3/30/16
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue

Reproduced on pristine 1.642.2 with same steps.

Not a regression, and apparently rare serious enough for users not to complain in numbers, so let's leave this until after 2.0.

Change By: Daniel Beck
Priority: Critical Minor
Labels: 2.0 2.0-beta  2.0-planned

tlopes.pt@outlook.com (JIRA)

unread,
Jun 29, 2016, 11:47:01 AM6/29/16
to jenkinsc...@googlegroups.com
Tiago Lopes commented on Bug JENKINS-33891
 
Re: Unexpected scrolling on job configuration page

Still happening on 2.10, checking an optionalBlock with the property ' inline="true" ' is causing the page to scroll to the bottom on Firefox

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

james.holderness@ibboost.com (JIRA)

unread,
Jul 19, 2019, 1:47:03 PM7/19/19
to jenkinsc...@googlegroups.com

I encountered a similar problem on the management Configure System page, while clicking on a checkbox for an optional block. I eventually tracked down the issue to a bug in the scrollIntoView function in hudson-behaviour.js (see here). This seems a generic enough function that I could imagine it causing problems in other places too.

The issue is that it's calculating the distance to move relative to the current scroll position, but it's obtaining the current scroll position from document.body.scrollTop which is always zero. It should be using document.documentElement.scrollTop (or possibly a combination of the two for backwards compatibility). Chrome used to support body.scrollTop, but that was a bug, and once that was fixed, anything that relied on the bug stopping working. You can read more about it in the Chromium issue tracker here and here.

This can be a difficult issue to reproduce, because sometimes it appears to work. But that's just because of another bug in the updateOptionalBlock function, which often returns a lot of NaN coordinates for the block's visible region. The result being that it just doesn't scroll at all (which is at least better that jumping to the bottom of the page).

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages