Closed cdjackson closed 9 years ago
Thats weird... I will have a look into it, but most probably the error is not in the toggle directive but in the fullscreenchange
on the fullscreen.js file.
Can you post in jsfiddle or other similar tool the code that produces the error?
Hmmm, well I tried editing one of your examples in plunkr, but I couldn’t get them to work. I initially thought it was because github doesn’t allow linking of files for this purpose, but even after sorting this out it didn’t work… Do you have a working plunkr or fiddle I can mess with?
Thanks.
Yes, I should add a mention about that, I think the problem is that plunkr is using an iframe and you cannot access the fullscreen API from there.
Buuuuuut....
If you go here http://hrajchert.github.io/angular-screenfull/#/api, click "edit in plunkr" on the first example and then inside plunkr you click on "Launch the preview in a separate window" then the example works :D
let me know if it works out
Yep - it works :)
So, I tried to recreate this, and can’t, so I removed the timeout, and it still works… I might have been a problem with Chrome - it was playing up, and I had to close it down forcefully… Anyway, it looks like there’s no problem, so we can close this…
Thanks for the support, and sorry for the hassle :)
Great! there is no hassle, if you run into this again just reopen.
Thanks for contributing
After toggling state, the ngsfToggleFullscreen directive doesn't update correctly. By adding a $apply() call inside a timer this is fixed -:
I'm not sure if the 500ms is needed (although some time is definately required and 100ms didn't work). Maybe it's also possible to get an event that would be more reliable...