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

LEAF 4139 update keypress listeners in orgchartForm #2235

Conversation

aerinkayne
Copy link
Contributor

This updates the .keypress listeners in the Nexus orgchartForm js file to .on("keydown" listeners.

This should restore enter-save functionality of Nexus employee, position and group modals. These were not changed in the recent update but seem to have been impacted by the addition of a dialogController modal keydown listener.

The deprecated/removed jQuery size() method was also replaced by the .length property to fix a separate uncovered error.

Impact/Testing
Nexus side, editable (check write access) position, group and employee fields should save when enter is pressed in orgForm modals. Confirm that these fields consistently save correctly (particularly the Position 'Pay Plan' field, which required a short timeout for the chosen dropdown).
Confirm that updating a position Total Headcount field does not result in an error.

@Pelentan Pelentan added the With QA Ticket is to QA. No changes unless pulled back to in progress label Nov 15, 2023
@AmandaSumner AmandaSumner added rc-ready Ready to be put in the next release candidate and removed With QA Ticket is to QA. No changes unless pulled back to in progress labels Nov 16, 2023
event
) {
if (event.which == 13) {
$("#" + dialog.btnSaveID).trigger("click");
setTimeout(() => { //timeout needed for ind 2 chosen dropdown
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what else might need to be reworked, but timeouts should not be used as they are less deterministic than typical event handlers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found another (and I agree better) solution to this which should result in the behavior being what it had been previously. If the chosen dropbox is open, the first 'enter' will just close it.

I had looked at the orgchart indicator formats and the position case looked like the only one that had a field with a dropdown - if this is not true I can also add this elsewhere.

@Pelentan Pelentan changed the base branch from master to rc/2023-21-14/Sprint-65-c2 November 21, 2023 14:09
@Pelentan Pelentan marked this pull request as ready for review November 21, 2023 14:09
@Pelentan Pelentan merged commit f2c5f2a into rc/2023-21-14/Sprint-65-c2 Nov 21, 2023
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rc-ready Ready to be put in the next release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants