adopted-ember-addons / adopted-ember-addons/ember-paper

paper-sidenav lockedOpen does not update accurately after wake some iPad devices

Aperta
#826 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
879
Fork
327
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Expected Behavior
Sidenav should be locked open in landscape mode. Putting the device to sleep and waking up should not affect this functionality.

## Current Behavior
The sidenav is locked open at first. Putting the device to sleep and waking it up causes the navbar to stay closed and no button is displayed to toggle it open/close, making it inaccessible.

## Possible Solution
I believe it is occuring in the paper-sidenav-inner.js updateLockedOpen() method. Hitting a breakpoint in this method while putting the device to sleep prevents the bug from occuring, so I think it might have to do with the method being invoked from the run.bind(). Possibly timing issues between the iPad doing something in the sleep process that modifies the window dimensions which affects what the window.matchMedia() method returns. I tried putting a breakpoint in the updateLockedOpen() when the device awakes, but it did not get hit.

## Steps to Reproduce
1. Go to a page with a sidenav that should be locked open in landscape mode on the listed platforms/environments (https://miguelcobain.github.io/ember-paper/#/ is an example).
2. Keep the device in landscape mode and put it to sleep (press lock button).
3. Wake the device up. The sidenav will be closed but no button to toggle it open will be visible.

## Context
-ember-paper page with a sidenav that is locked open in landscape mode
-iPad in landscape mode with iOS 10.3.2 (excluding iPad Pro 12.9 inch) (I haven't tested this in other iOS versions yet)

## Additional Details
This bug does not occur on the angularjs material site. I also noticed a difference between ember-paper and angularjs material behaviour when repeating the steps above in portrait mode. If the side nav is toggled open and the device is put to sleep, it will remain open in angularjs material when awaking. Ember-paper will have its sidenav closed when awaking in portrait mode. This might be a clue as to what is going on.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.