Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal gracefully with elements that have no computed style available #550

Merged
merged 2 commits into from
Jul 23, 2014

Conversation

jmcphers
Copy link
Member

@jmcphers jmcphers commented Jul 22, 2014

No description provided.

@jjallaire
Copy link
Member

@yihui, @wch, and @jcheng5, is this something we can get into v0.10.1? (it fixes a pretty fundamental problem with shiny widgets (embedded apps) in ioslides presentations).

@wch
Copy link
Collaborator

wch commented Jul 23, 2014

Sure, it looks OK to me. Do you mind adding a comment about which browsers you've encountered that have this behavior?

@yihui yihui added this to the 0.10.1 milestone Jul 23, 2014
@yihui
Copy link
Member

yihui commented Jul 23, 2014

Yep, looks good to me, too.

@jjallaire
Copy link
Member

Here is the original issue where it was tracked in rmarkdown (some notes about browsers there):
rstudio/rmarkdown#184

@trestletech or @jmcphers do you have anything to add about where/when this issue was encountered?

@fereshtehRS
Copy link

I have seen the issue mostly with Firefox (FF 31 on Mac and FF 23 on Ubuntu).

@jmcphers
Copy link
Member Author

This appears to be the offending bug in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=548397. I've updated the comment.

wch added a commit that referenced this pull request Jul 23, 2014
Deal gracefully with elements that have no computed style available
@wch wch merged commit 36aefad into master Jul 23, 2014
@wch
Copy link
Collaborator

wch commented Jul 23, 2014

Great, thanks!

@fereshtehRS
Copy link

I installed the latest shiny package, and see improvement on this issue using Firefox, but not completely fixed.
I am using the presentation document via Shiny Server.
My presentation has 3 embedded shiny apps on pages 6, 7, and 8. Previously if I paged through the slides none of these apps would be loaded. Now, when I page through the slides, apps on pages 6 and 7 are loaded, but app on page 8 still not loaded.

@jmcphers
Copy link
Member Author

@fereshtehRS , thanks for testing the fix so promptly. I can't reproduce the problem on my end with > 10 apps, so maybe specific to something in the app on page 8--does that app work if it's on page 6? Can you share your presentation?

@fereshtehRS
Copy link

I only see this with Firefox (my version is 31). Emailed you the presentation.
The app loads fine if I am on that page (page 8) and refresh browser. It is only a matter of paging through presentation slides.
I can see this through Shiny Server and local Shiny.

@tareefk
Copy link

tareefk commented Jul 24, 2014

There may be more than one place that this happens. I was talking with Winston and with the CRAN version of Shiny you can see this error in Firefox.

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ jquery.js:9627
syntax error token:1
TypeError: window.getComputedStyle(...) is null selectize.min.js:2

@wch
Copy link
Collaborator

wch commented Jul 24, 2014

I found this in selectize.min.js:

e=window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue("direction"):f.currentStyle

So it's the same issue as Jonathan fixed in shiny.js. It looks like we'll need a customized version of selectize, unless they've fixed it in recent versions.

@jcheng5
Copy link
Member

jcheng5 commented Jul 24, 2014

It's not fixed but we could submit a PR.

wch added a commit to wch/shiny that referenced this pull request Jul 24, 2014
This is a workaround for issue rstudio#550. This version is based on selectize version 0.9.1.
@yihui yihui deleted the bugfix/offscreen-shinyapps branch August 28, 2014 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants