question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extra space when changing between portrait and landscape on tablets

See original GitHub issue
  • pure-react-carousel version: master
  • react version: v16.8.6
  • browser used: Chrome v 78.0.3904.108
  • node version:

Relevant code or config:

N/A

What you did:

Change orientation from portrait to landscape on any tablet.

What happened:

If we are at the last slide and changing on landscape, there is a space left out to the right, past the limit that you can normally navigate using the navigation buttons. When we first navigate to the left, the space goes away and everything works fine.

Reproduction:

Attached some screenshots:

Tablet, scrolled to the last slide

Screenshot 2020-09-08 at 18 33 35

Switch orientation to landscape -> see the space to the right

Screenshot 2020-09-08 at 18 33 48

Navigate to the left and try go to the last slide -> normal behaviour

Screenshot 2020-09-08 at 18 33 57

Problem description:

From what I saw, the problem comes from the translateX property value which at the last slide it is different on portrait/landscape. Also the currentSlide value is slightly different on landscape/portrait.

Not good for UX because when changing orientation you get in a state that you are not supposed to get into.

Suggested solution:

I’m not sure

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Alucard17commented, Feb 5, 2021

@hectordommo can you create code sandbox example for it, it would be helpful.

0reactions
rhythms06commented, Jan 19, 2022

The best workaround at the moment is probably listening for rotation events, and programmatically modifying currentSlide on those events of choice, as is mentioned in #272 and #116.

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - Issue with white space when changing from landscape to ...
A website I am working on for a personal project requires a large background image (full screen) below this just offscreen is my...
Read more >
How To Fix Android Tablets - Force All Apps Into Landscape ...
Your browser can't play this video. Learn more. Switch camera.
Read more >
Android Tablet How To Rotate Screen Instructions, Guide, Help
Samsung Galaxy Tab Tablets at Amazon - https://amzn.to/35aycSEHow To Lock Screen on Samsung Android Tablet - Samsung Tablet How To Rotate ...
Read more >
How to Switch to Portrait or Landscape Mode on Android
1. Swipe down from the top of the screen. This displays the Quick Settings icons at the top as well as your notifications....
Read more >
Change screen size and orientation of canvas apps
Under Orientation list, select Portrait or Landscape. Orientation for phone layout. (Tablet apps only) Under Aspect ratio, perform either of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found