-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
stopApp not working on Window when started with runApp(..., launch.browser = TRUE) #894
Comments
Hi, shiny::runApp('/Volumes/DATA/radiant/test')
locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
For @vnijs maybe the window is closing before the stop message is sent? |
@vnijs If the objective is to stop the loop when the user goes away, you could also use something like |
@wch Same things happens on Windows when launching from Rgui or from a terminal. No issues on Mac (viewer or browser, Chrome or Safari) or when using the Rstudio viewer on windows. The issue occurs when launching to a browser on Windows (Chrome). Interestingly, the link does seem to work on windows with Firefox although is doesn't close the browser. @jcheng5 On 'window closing before stop message' ... could be. Not sure. Why would closing the window interupt the observeEvant? Also, should that timing be different on Mac and Windows (both Chrome)? Everything works fine on mac. For firefox on windows the app is stopped but the browser is not closed. Question: To test the timing hypothesis can you call "window.close();" from an observeEvent? If so, how-to? @jcheng5 I already use onSessionEnded to save state. This is necessary to ensure state is not lost on refresh or if a user accidentally closes a tab. |
@wch I don't think this issue is related to #869 However, the following issue might be vnijs/radiant#22 (comment) It seems the Rstudio viewer hides inputs that the browser does show. |
@jcheng5 Looks like you were right. I added a small delay to window.close and now it works as intended on Windows (Chrome) as well (see below). It still seems a bit odd that the timing is different on Mac and Windows (both Chrome)?
|
@wch Any idea why the Rstudio viewer might hide elements an external browser does show? Let me know if this should be a separate issue and you want to close this one. |
Having trouble with stopApp on Windows when adding launch.browser = TRUE. Works fine on Mac but on Windows nothing happens. Sessioninfo given below.
Dropbox link for ui.R and server.R:
https://www.dropbox.com/sh/p0mdx8fr0wljy4h/AAA1p82DeC4JAb0pjP-XBQXCa?dl=0
ui.R:
Server.R
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.12.1
loaded via a namespace (and not attached):
[1] R6_2.1.0 htmltools_0.2.6 tools_3.2.0 rstudioapi_0.3.1 Rcpp_0.11.6 rstudio_0.98.1103
[7] jsonlite_0.9.16 digest_0.6.8 xtable_1.7-4 httpuv_1.3.2 mime_0.3
The text was updated successfully, but these errors were encountered: