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

Windows.close() #112

Closed
AYarter opened this issue Aug 18, 2020 · 1 comment
Closed

Windows.close() #112

AYarter opened this issue Aug 18, 2020 · 1 comment

Comments

@AYarter
Copy link

AYarter commented Aug 18, 2020

My application uses a window.close(), which doesn't work when the application is run through applicationize me. The failing code is below:

--
|$("#clickUpdate").click(function(){ 
| editS1();
  | if(error=="false") {
  | document.S1.MODE.value = "UPD";
  | document.S1.submit();
  | return true;
  | }
  | });
  |  
  | $( "#clickClose" ).click(function() {
  | if(changeflg=="true") {
  | confirmChgs();
  | if(save=="true") {
  | document.S1.MODE.value = "UPD";
  | document.S1.submit();
  | return true;
  | }
  | else {
  | // Record Will Only Be Locked If Save Button Is Enabled.
  | if ($('#clickUpdate').is(':disabled') == false) {
  | unlock();
  | window.opener.clickRefresh();
  | }
  | window.close();
  | return;
  | }
  | }
  | else {
  | // Record Will Only Be Locked If Save Button Is Enabled.
  | if ($('#clickUpdate').is(':disabled') == false) {
  | unlock();
  | window.opener.clickRefresh();
  | }
  | window.close();
  | return;
  | }
  | });
  |  
  | });

@eladnava
Copy link
Owner

eladnava commented Aug 22, 2020

Hi @AYarter,
Thanks for reporting this.

Unfortunately, Applicationize doesn't support JS popup windows all-too-well currently, and it is in low-priority to fix this as Chrome Packaged Apps are being deprecated.

Please consider this alternative solution baked into Chrome which handles JS popups well:
#25 (comment)

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

No branches or pull requests

2 participants