Within my ts file i open a boostrap modal using the .open command. Then upon pressing the save button another modal gets open and the previous one gets closed. Here the problem is that the first modal recieves focus on itself and the elements inside it BUT second modal doesn't get focus! Here is what is happening: I click a button and i open a modal A In modal A i have some html elements including two buttons to save and close the modal If i click the save button from modal A this modal will get closed and another modal will open This second opened modal doesn't get focus when pressing TAB Here is a stackblitz : StackBlitz Demo How this stackblitz works: If you click the first button is going to open the modal A then clicking save on that modal will open another modal B Inside modal B if you try to tab is going to tab on the elements in the background WHY? I want to give my second modal focus. I tried with Directives and other things that angular suggest bu...
A site where you can share knowledge