Page MenuHomePhabricator

File anchor links can load scrolled to the wrong file
Open, NormalPublic

Description

The PHUIFeedStoryExample.php link in the table of contents of D18050 links to D18050#5a5324e8. Pasting that link into a new browser page finds the browser pane scrolled to the middle of the PhabricatorFilesComposeAvatarExample.php file -- that is, scrolled too far down:

Screenshot 2017-05-30 16.31.43.png (898×1 px, 223 KB)

This seems to be due to lazy-loading of the file sections. Where the browser pane ends up centered seems to be a function of the height of the browser window; a smaller window finds me earlier, at PHUIHovercardUIExample.php, a taller one at PhabricatorNotificationUIExample.php.

This makes it hard to reference files in a diff out-of-band.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

Forgot to specify browser: this is Chrome 58.0.3029.110 (64-bit) on OS X and Linux. Also replicates on Safari 10.1.1 (12603.2.4).

T11997/T12032 look related, but not the same behavior.

Possibly fallout from T11784 / D17911, although those shouldn't really interact here unless there are other bugs.

epriestley added a revision: Restricted Differential Revision.May 31 2017, 12:43 AM
epriestley triaged this task as Normal priority.
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.May 31 2017, 12:56 AM
epriestley added a commit: Restricted Diffusion Commit.

I think that got things closer but we aren't quite there yet. I'll poke at this a bit more tomorrow.

tomorrow

(This is still on my radar.)

epriestley added a revision: Restricted Differential Revision.Jun 1 2017, 7:22 PM
epriestley added a commit: Restricted Diffusion Commit.Jun 1 2017, 7:40 PM

This is still not working very well for me in Safari in production, although I don't seem to be able to break it in Chrome or Firefox anymore after a few tries.

Obviously, it works flawlessly every time in Safari locally.

Thanks for the fixes! Most folks are on Chrome at Dropbox, so Safari being subject to the Heisenprod Uncertainty Principle doesn't worry me much.