Skip to content
Snippets Groups Projects
Commit 3a2a8817 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

Courseware: Tastaturbedienung funktioniert nicht mehr

Closes #4988

Merge request studip/studip!3755
parent 00b0a955
No related branches found
No related tags found
No related merge requests found
<template>
<focus-trap v-model="trap" :clickOutsideDeactivates="false" :fallbackFocus ="() => fallbackFocusElement">
<focus-trap :active="showToolbar" :clickOutsideDeactivates="false" :fallbackFocus ="() => fallbackFocusElement">
<div
class="cw-ribbon-tools"
:class="{ 'cw-ribbon-tools-consume': consumeMode }"
......@@ -70,7 +70,6 @@ export default {
return {
showContents: true,
showUnits: false,
trap: false,
};
},
computed: {
......@@ -86,6 +85,7 @@ export default {
userById: 'users/byId',
userId: 'userId',
currentElementisLink: 'currentElementisLink',
showToolbar: 'showToolbar',
}),
isTeacher() {
return this.userIsTeacher;
......@@ -105,19 +105,15 @@ export default {
contents.scroll({ top: current.offsetTop - 4, behavior: 'smooth' });
}
},
activate() {
const focusElement = this.$refs.tabs.getActiveTabElement();
if (focusElement) {
this.initialFocusElement = focusElement;
this.trap = true;
}
}
},
mounted() {
watch: {
showToolbar(newState) {
if (newState) {
this.$nextTick(() => {
this.activate();
this.$nextTick(() => this.scrollToCurrent());
this.scrollToCurrent();
});
},
}
}
}
};
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment