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

"Edit not saved" warning when inline-editing in Leads DetailView requires multiple Cancel clicks #7432

Open
connorshea opened this issue Jun 19, 2019 · 2 comments
Labels
Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type: Bug Bugs within the core SuiteCRM codebase

Comments

@connorshea
Copy link
Contributor

connorshea commented Jun 19, 2019

Issue

When inline-editing a field in the Leads DetailView (and presumably elsewhere in the CRM) and then clicking outside the field, a dialog pops up with a warning about how the edit isn't saved. When you click "Cancel", the dialog will reappear one or more times before it finally disappears.

This is the same issue as #2545, which was supposed to have been fixed back in 2017, but as far as I can tell was not.

Expected Behavior

Hitting Cancel once after the dialog appears would return to the inline edit.

Screen Shot 2019-06-19 at 11 56 22 AM

Actual Behavior

The browser alert appears multiple times before being fully dismissed.

Possible Fix

There was a supposed fix in 57bf2e3, but either a regression was introduced since then or it never fully fixed the problem.

Steps to Reproduce

  1. Go to the Demo CRM, or any other CRM you have that's on 7.9.x through 7.11.x, and login
  2. Go to a Lead's DetailView
  3. Double-click a field to inline-edit it
  4. Change the value any way you want, it doesn't matter as long as it differs from the original value
  5. Click anywhere outside the field to exit the inline-edit state
  6. A popup should appear warning you about abandoning the edit, hit Cancel.
  7. The dialog will appear again multiple times, and eventually stop after you hit Cancel enough times.

Screen recording of the bug, I perform it twice here: https://imgur.com/XH6uw9O

I should mention that I've had some trouble getting it to occur 100% of the time, but I'm not sure if there's any pattern with when it occurs vs. when it doesn't.

Context

This isn't a huge deal, and is probably low priority, but still annoying.

Your Environment

  • SuiteCRM Version used: 7.9.17, 7.10.15, and 7.11.5
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): I've been able to reproduce it in Chrome 75 and Firefox 67
  • Environment name and version (e.g. MySQL, PHP 7): MySQL 5.7, PHP 7.0
  • Operating System and version (e.g Ubuntu 16.04): Debian Linux (server), macOS Mojave 10.14.5 (client)
@Dillon-Brown Dillon-Brown added Type: Bug Bugs within the core SuiteCRM codebase Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds labels Jun 28, 2019
@connorshea
Copy link
Contributor Author

connorshea commented Jul 24, 2019

Interestingly, it only seems to happen on pages where the AJAX UI is being used.

For example, on index.php?module=Leads&action=DetailView&record=2260204e-5930-2417-18f2-5c4f2e1b77b8 it does not happen.

But if you have a URL like /index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DLeads%26offset%3D7%26stamp%3D1563982852061090500%26return_module%3DLeads%26action%3DDetailView%26record%3D58e2a074-427e-bf9c-c4b1-5c4f2e75e9ff, it does happen.

EDIT: Actually, it seems that may not be entirely true. It seems like it only happens when the previous/next buttons are visible on the page?

@connorshea
Copy link
Contributor Author

Okay, my last comment was wrong.

My current understanding of how to reproduce this issue:

  • Go to a Lead detailview page (or any detailview page should work, really).
  • Hard reload.
  • If you edit a field now and try to click out, the 'cancel' dialog will only show up once.
  • Click the next or previous buttons to navigate to a new Lead.
  • If you edit a field and try to click out now, then hit cancel on the dialog it'll show up twice. I think this keeps adding up every time you move pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants