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;
}
.spacer-x-small {
margin: $space-x-small 0;
}
> :nth-child(n):not(:last-child) {
margin-bottom: $space-small;
}
.user-teaser {
margin-bottom: $space-x-small;
}
}
</style>

View File

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