review: apply suggestions

Co-Authored-By: Alina Beck <alina.beck@mail.com>
This commit is contained in:
Raphael Beer 2020-04-09 23:01:54 +02:00 committed by GitHub
parent 72dfeb3983
commit 38233da6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -143,8 +143,12 @@ export default {
color: $text-color-soft; color: $text-color-soft;
} }
.spacer-x-small { > :nth-child(n):not(:last-child) {
margin: $space-x-small 0; margin-bottom: $space-small;
} }
.user-teaser {
margin-bottom: $space-x-small;
}
} }
</style> </style>

View File

@ -7,12 +7,8 @@ export default ({ app }) => {
// Focus the element // Focus the element
Vue.nextTick(() => { Vue.nextTick(() => {
if (binding.value !== false) { if (binding.value !== false) {
let target = el const target = el instanceof HTMLInputElement ? el : el.querySelector('input')
const isInput = target instanceof HTMLInputElement if (target) {
if (!isInput) {
target = el.querySelector('input')
}
if (target && typeof target.focus === 'function') {
target.focus() target.focus()
} }
} }