Closed metas-dh closed 5 years ago
@siemiatj I have looked a bit over this task and I would need help to figure out a correct solution.
Steps to describe the issue:
Possible solution: There should be a mechanism to tell which modal is top most and Alt+Enter should only close top most. Do we have such a logic? And I will also have to understand how close shortcut works.
Here's some code that might be helpful here. There's a logic to control the order of firing events I've added exactly for this case (when there are multiple event listeners on the same key combination):
So the way it works is:
and here's a valid use case:
which is called only when a handleAdvancedEdit
prop is given. Otherwise it's skipped
This should be fixed with the previous commit. And I also fixed a memory leak (setState on unmounted component).
works fine, see IT of me03 issue.
Is this a bug or feature request?
Bug
What is the current behavior?
[alt]+Enter is not working correctly in 2nd modal overlay: instead of closing the 2nd modal overlay only, it closes both the 1st and 2nd one. The action is called correctly though, e.g. in manufacturing order, the received HUs are created.
Which are the steps to reproduce?
e.g. transform a HU in material receipt candidates: http://recordit.co/IRcvCHL1RW
e.g. manufacturing order, receive: http://recordit.co/3jE5r25hbw
What is the expected or desired behavior?
After [alt]+Enter only the 2nd modal overlay shall be closed, not both the 1st and the 2nd.