Hide outlines on click

This commit is contained in:
Preston 2020-09-15 22:55:19 -04:00
parent 2a0c062915
commit f9d35e68ab
3 changed files with 24 additions and 9 deletions

View File

@ -11,6 +11,10 @@ body {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
} }
.hideOutlines *:focus {
outline: none;
}
.routerView { .routerView {
margin-left: 200px; margin-left: 200px;
margin-top: 80px; margin-top: 80px;

View File

@ -27,6 +27,11 @@ export default Vue.extend({
FtToast, FtToast,
FtProgressBar FtProgressBar
}, },
data: function () {
return {
hideOutlines: true
}
},
computed: { computed: {
isOpen: function () { isOpen: function () {
return this.$store.getters.getIsSideNavOpen return this.$store.getters.getIsSideNavOpen
@ -48,13 +53,6 @@ export default Vue.extend({
this.activateKeyboardShortcuts() this.activateKeyboardShortcuts()
this.openAllLinksExternally() this.openAllLinksExternally()
} }
// try {
// const doc = yaml.safeLoad(fs.readFileSync('./static/locales/en-US.yaml'))
// console.log(doc)
// } catch (e) {
// console.log(e)
// }
}, },
methods: { methods: {
checkLocale: function () { checkLocale: function () {
@ -106,6 +104,9 @@ export default Vue.extend({
activateKeyboardShortcuts: function () { activateKeyboardShortcuts: function () {
$(document).on('keydown', this.handleKeyboardShortcuts) $(document).on('keydown', this.handleKeyboardShortcuts)
$(document).on('mousedown', () => {
this.hideOutlines = true
})
}, },
handleKeyboardShortcuts: function (event) { handleKeyboardShortcuts: function (event) {
@ -119,6 +120,11 @@ export default Vue.extend({
break break
} }
} }
switch (event.code) {
case 'Tab':
this.hideOutlines = false
break
}
}, },
openAllLinksExternally: function () { openAllLinksExternally: function () {

View File

@ -1,5 +1,10 @@
<template> <template>
<div id="app"> <div
id="app"
:class="{
hideOutlines: hideOutlines
}"
>
<top-nav ref="topNav" /> <top-nav ref="topNav" />
<side-nav ref="sideNav" /> <side-nav ref="sideNav" />
<Transition <Transition
@ -25,4 +30,4 @@
<style src="./themes.css" /> <style src="./themes.css" />
<style src="./videoJS.css" /> <style src="./videoJS.css" />
<style scoped src="./App.css" /> <style src="./App.css" />