githubbob42 / mingle2github2

0 stars 1 forks source link

Message: t.GetDirtyProperties is not a function #5755

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 6120 This PR was reverted

https://github.com/Liquidframeworks/alpine-mobile/commit/6a5e8f8dda03a8fd6ff2ace05a371e99391a3c72

It because we do some weird navigation from Modals in a few circumstances.  E.g.

/alpine-mobile/www/app/fx-forms/children.js:
   28
   29      return dialog.showModal(model, params).then(function() {
   30:        router.navigate(new URL(document.URL).pathname, { trigger: true });
   31      });
   32    };

In this case, the modal is still open when we navigate and closing the modal is animated so if we close it, the modal div will still technically be on the screen for a second or two afterwards...

There a few other similar examples of this in the code as well in the quote code...

Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID| |
|User ID| |
|RayGun Error ID|https://app.raygun.com/crashreporting/pianhu/errors/2289727050|
  1. See card: [alpine_mobile/#6117] RayGun t.GetDirtyProperties is not a function

Expected Result

Should not throw error

Actual Result

page locks after clicking close and you have reload page

Analysis

Not sure what’s going on here but my theory is that the Disposable() module is biting us again.  I think it’s tearing down all of the objects/properties of the Form and something is calling isDirty.

If you return false from page/module that opened to modal, it will effectively block the back button.  The problem is there are MANY modules that open modals.  We would have to get references to EVERY modal (maybe only the ones based on Form?) and prevent deactivation if it’s open.

FOR NOW:  simply block navigation when a true Modal is open.  Note that we hack the appearance of Modals for a few screens:

The following are faux modal forms and the Back button will NOT be blocked on these forms:

Related Cards

[alpine_mobile/#6122] close opened modal on back button pressed

[alpine_mobile/#6117] RayGun t.GetDirtyProperties is not a function

Impact Analysis

Developers: Fill in this area during code review.

Test Plan

Click through Mobile opening modals (the screen takes up the whole screen with an “X” in the top right corner) and:

QA Test Analysis:

githubbob42 commented 5 years ago

Pull Request #2993