Closed Bug 903564 Opened 7 years ago Closed 7 years ago

Opening the findbar shifts the page content downwards on pages without scroll-bars

Categories

(Firefox :: General, defect)

26 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 27

People

(Reporter: alice0775, Assigned: mikedeboer)

References

(Blocks 1 open bug, )

Details

Bug 893446 did not fix

Steps To Reproduce:
1. Open http://www.din.or.jp/~hagi3/JavaScript/JSTips/DHTML/PropertyViewer/PropViewer.htm
2. Open Findbar

Actual Results:
Page move downward

Expected Results:
Should not
Summary: Page move downward when Findbar open → Opening the findbar shifts the page content downwards on pages without scroll-bars
Yes :(

I don't know what to do here, except redesigning the findbar completely to work like in Chrome.
I commented on this issue in bug 893446 comment 92:
> In the case of short pages, we could fix the min-height of the page to the
> height of the viewport. That way, the extra whitespace would be part of the
> page, and all of that could be scrolled up as the find bar comes down. In
> other words, if the page is too short make it taller. This is, admittedly,
> kind of a hack, though it might be preferable to having any cases where the
> page shifts. As a side note, let me point out that, with short pages, you’re
> somewhat less likely to run a find, since you can see the entire page all at
> once.

I checked this on Nightly, and modifying the min-height and overflow properties for the page when the find bar appears actually seems to work. I added this to the page:

    html { min-height: calc(100% + 38px); overflow: hidden; }

(38px is the height of the find bar on Ubuntu.) I tried this on google.com, and found no user-visible issues or weirdness. This worked on the page in comment 0 as well.

The way I did it is indeed quite hacky, but the basic idea seems promising, so perhaps a real solution can be implemented.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #3)
> Also fixed by bug 914180, right?

Yes, it was. Thanks for tracking this! I'm closing this as FIXED, but please change the flag if another resolution seems more appropriate.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → mdeboer
Target Milestone: --- → Firefox 27
You need to log in before you can comment on or make changes to this bug.