Skip to content

Conversation

@PeterChaplin
Copy link
Contributor

See https://github.com/qcode-software/mla/issues/5473

Testing

  • Ran concatenated code on mla-erp dev
  • Enter customer page orders tab and navigate away (unwanted dialog did not appear)
  • Enter orders tab, make a change but do not save, attempt to navigate away (dialog appears as expected)
  • Save a change, navigate away (change saves correctly, dialog does not appear)

@PeterChaplin PeterChaplin changed the base branch from master to main-5 June 1, 2023 14:57
@bvw
Copy link
Member

bvw commented Jun 2, 2023

What was the history behind this change?

@PeterChaplin PeterChaplin assigned nicky-johnstone and bvw and unassigned bvw Jun 5, 2023
@PeterChaplin
Copy link
Contributor Author

In relation to https://github.com/qcode-software/mla/issues/5473
When a cell of type "bool" is given focus, the editor is initialised with the cell contents. This is triggering the editorValueChange event, which marks the row as dirty, which sets up the dbGrid onbeforeunload handler. When the user goes to navigate away, they get a "Leave Site?" dialog, despite not having made any changes.
Other editor types do not have this behaviour, and only fire an editorValueChange event when the user changes the value of the input, not on initial load.
I believe that this editor should do the same, and that the existing behaviour is a bug.

@bvw bvw merged commit 32d8caa into main-5 Jun 5, 2023
@PeterChaplin PeterChaplin deleted the mla-5473-leave-site-change branch June 5, 2023 13:10
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.

4 participants