Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17050 closed defect (fixed)

SwapView height calculation does not take into account the view borders

Reported by: Sebastien Brunot Owned by: Patrick Ruzand
Priority: undecided Milestone: 1.9.1
Component: DojoX Mobile Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

If a swap view has top and / or bottom borders, for example when using the documented workaround "How do I avoid the margin-collapsing problem?" in http://dojotoolkit.org/reference-guide/1.8/dojox/mobile/faq.html#dojox-mobile-faq, the height calculated by scrollable.js for the swap view does not take into account the borders. As a consequence, the view does not fit in the viewport and a vertical scrollbar is displayed by the browser.

This can be seen using the test page dojox/mobile/tests/test_SwapView-show.html

Attachments (2)

ticket17050.patch (1.6 KB) - added by Sebastien Brunot 6 years ago.
scrollable now take into account the borders when calculating the size (IBM CCLA).
tickets17050-15761.patch (7.7 KB) - added by Sebastien Brunot 6 years ago.
scrollable now take into account the borders when calculating the size (IBM CCLA).

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by Sebastien Brunot

Attachment: ticket17050.patch added

scrollable now take into account the borders when calculating the size (IBM CCLA).

comment:1 Changed 6 years ago by Sebastien Brunot

I've added a patch that fix the issue.

Changed 6 years ago by Sebastien Brunot

Attachment: tickets17050-15761.patch added

scrollable now take into account the borders when calculating the size (IBM CCLA).

comment:2 Changed 6 years ago by Sebastien Brunot

Added a fix for this defect and http://trac.dojotoolkit.org/ticket/15761. The name of the patch is tickets17050-15761.patch

comment:3 Changed 6 years ago by Paul Christopher

See my comment at http://bugs.dojotoolkit.org/ticket/17017#comment:8 : Why is .mobile body {overflow-x: hidden} only and not {overflow: hidden} ? A desktop browser should never display scrollbars. If the content is bigger than the viewport, dojox/mobile/ScrollableViews need to be used.

comment:4 in reply to:  3 Changed 6 years ago by Eric Durocher

See my answer to your comment on #17010#comment:9.

I don't quite agree with:

If the content is bigger than the viewport, dojox/mobile/ScrollableViews need to be used.

because as I say in the other ticket an app could decide to create a page higher than the viewport and let the browser scroll it without using a ScrollableView (assuming there are no fixed headers/footers of course).

Again, you may be right that we could set {overflow: hidden} and not just overflow-x, but there is still a risk to break existing apps and you have an easy workaround...

Last edited 6 years ago by Eric Durocher (previous) (diff)

comment:5 Changed 6 years ago by Paul Christopher

Agreed: Setting overflow:hidden needs careful testing and might break existing apps. And I know in my app how to fix it. So we can keep this topic in mind and close it for now.

comment:6 Changed 6 years ago by Eric Durocher

Milestone: tbd1.9.1

comment:7 Changed 6 years ago by Patrick Ruzand

Owner: changed from Eric Durocher to Patrick Ruzand
Status: newassigned

comment:8 Changed 6 years ago by Patrick Ruzand <pruzand@…>

Resolution: fixed
Status: assignedclosed

In 426bb8150933d925816df9ca0195639802095b1a/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 6 years ago by Patrick Ruzand <pruzand@…>

In 26c19424e603eacedd7b8336d71e255841c036ef/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.