Closed Bug 462278 Opened 16 years ago Closed 16 years ago

Week view should default to being scrolled to the "Day Starts At" time

Categories

(Calendar :: Calendar Frontend, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dmosedale, Assigned: Fallen)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now, it seems to default to midnight, which looks really weird.
Flags: tb-integration+
Priority: -- → P3
Duplicate of Bug 412663?
Given dbo's comment in that bug, I assume it makes sense to keep this one open and on the radar.
Assignee: nobody → philipp
Attached patch Fix - v1 (obsolete) β€” β€” Splinter Review
This fixes and also consolidates a couple of multiday view methods. May depend on bug 456379's patch. There is a small flicker when starting up unfortunately, since before the view is shown (at least in lightning), the box height is not calculated and therefore the scrollHeight is also not calculated, making any scroll fail silently.

I've removed the global scroll handler since it seems to work fine directly on the binding itself. I'm not sure why this needed to be global since there was no comment and no notice in the original bug. berend, maybe you know better?
Attachment #350488 - Flags: review?(Berend.Cornelius)
Status: NEW → ASSIGNED
Comment on attachment 350488 [details] [diff] [review]
Fix - v1

Patch looks good and works as advertised. I especially like that we got rid of the ugly scrollhandler implementation.
>-        this.mScrollHandler = function scrollHandler() { self.onScroll(); };
>-        window.addEventListener("scroll", this.mScrollHandler, true);

While you were dealing with the scrollbox, I would also rename its id to something more self-explaining than "childbox"

>+          if (scrollBoxObject && childbox.scrollHeight > 0) {

I believe that the condition would have to be 
if (scrollBoxObject && childbox.scrollHeight > childbox.clientHeight) {

r=berend
Attachment #350488 - Flags: review?(Berend.Cornelius) → review+
Attachment #350488 - Attachment is obsolete: true
(In reply to comment #4)
> I believe that the condition would have to be 
> if (scrollBoxObject && childbox.scrollHeight > childbox.clientHeight) {
Not needed. If the element is not sized (i.e view hasn't been shown), then the scrollHeight is 0.


Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/6ada4b8913e6>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
>> I believe that the condition would have to be 
>> if (scrollBoxObject && childbox.scrollHeight > childbox.clientHeight) {
>Not needed. If the element is not sized (i.e view hasn't been shown), then the
>scrollHeight is 0.

But how else do you catch the case of a displayed scrollbox that has not overflown, because 24 hours are displayed in the view, so that no scrollbar is displayed? There is no need to "scrollToMinute" in that case.
Of course, in the "scroll" handler your condition makes sense.
I guess we can skip scrolling there, although it shouldn't hurt either. Have you tested the patch with your version of the condition?
Checked in lightning and sunbird build 20081207 -> VERIFIED.
Status: RESOLVED → VERIFIED
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1

This seems to be recurring. I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1617587

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: