Skip to content

Commit

Permalink
Merge pull request #12373 from LianaHarris360/delete-section-bug
Browse files Browse the repository at this point in the history
Wrap section deletion modal in focus trap
  • Loading branch information
rtibbles authored Jun 28, 2024
2 parents 0f80b13 + 38d8751 commit d966f48
Showing 1 changed file with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,22 @@
</AccordionContainer>
</div>
</KTabsPanel>
<KModal
v-if="showDeleteConfirmation"
:title="deleteSectionLabel$()"
:submitText="coreString('deleteAction')"
:cancelText="coreString('cancelAction')"
@cancel="showDeleteConfirmation = true"
@submit="handleConfirmDelete"
>
{{
deleteConfirmation$({
section_title: displaySectionTitle(activeSection, activeSectionIndex),
})
}}
</KModal>
<FocusTrap>
<KModal
v-if="showDeleteConfirmation"
:title="deleteSectionLabel$()"
:submitText="coreString('deleteAction')"
:cancelText="coreString('cancelAction')"
@cancel="showDeleteConfirmation = false"
@submit="handleConfirmDelete"
>
{{
deleteConfirmation$({
section_title: displaySectionTitle(activeSection, activeSectionIndex),
})
}}
</KModal>
</FocusTrap>
</div>

</template>
Expand All @@ -338,6 +340,7 @@
import AccordionItem from 'kolibri-common/components/AccordionItem';
import AccordionContainer from 'kolibri-common/components/AccordionContainer';
import useAccordion from 'kolibri-common/components/useAccordion';
import FocusTrap from 'kolibri.coreVue.components.FocusTrap';
import { injectQuizCreation } from '../../../composables/useQuizCreation';
import commonCoach from '../../common';
import { PageNames } from '../../../constants';
Expand All @@ -355,6 +358,7 @@
DragSortWidget,
DragHandle,
TabsWithOverflow,
FocusTrap,
},
mixins: [commonCoreStrings, commonCoach],
setup() {
Expand Down

0 comments on commit d966f48

Please sign in to comment.