Skip to content

Commit

Permalink
Blur controls after click
Browse files Browse the repository at this point in the history
in order to hide tooltip when not hovering anymore.
(The tooltip stayed visible e.g. when en/disabling the camera)
  • Loading branch information
paulgoetze committed Nov 27, 2021
1 parent e300e64 commit 3a5b2a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/components/Party.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<button
:title="$t('party.infoTitle')"
class="control control--info"
@click="$emit('open-info-screen', 'about')"
@click="$emit('open-info-screen', 'about'); $refs.info.blur()"
ref="info"
v-if="controlsActive"
>
<inline-svg
Expand All @@ -40,7 +41,7 @@
<button
:title="$t('party.copyLinkTitle')"
class="control control--copy-link"
@click="copyShareLink"
@click="copyShareLink(); $refs.copyLink.blur()"
ref="copyLink"
v-if="controlsActive && canShare"
>
Expand All @@ -56,7 +57,8 @@
<button
:title="cameraOff ? $t('party.turnOnCameraTitle') : $t('party.turnOffCameraTitle')"
class="control control--camera"
@click="toggleCamera"
@click="toggleCamera(); $refs.camera.blur()"
ref="camera"
v-if="controlsActive && localPeer.hasVideo()"
>
<inline-svg
Expand All @@ -71,7 +73,8 @@
<button
:title="microphoneMuted ? $t('party.unmuteMicrophoneTitle') : $t('party.muteMicrophoneTitle')"
class="control control--microphone"
@click="toggleMicrophone"
@click="toggleMicrophone(); $refs.microphone.blur()"
ref="microphone"
v-if="controlsActive && localPeer.hasAudio()"
>
<inline-svg
Expand Down Expand Up @@ -101,7 +104,8 @@
:title="$t('party.openTextChatTitle')"
class="control control--text-chat"
:class="{'control--alert': this.chatNewMessages}"
@click="toggleChat"
@click="toggleChat(); $refs.chat.blur()"
ref="chat"
v-if="controlsActive"
>
<inline-svg
Expand All @@ -117,7 +121,7 @@
:title="$t('switchLanguageTitle')"
class="control control--switch-language"
ref="switchLanguage"
@click="switchLanguage"
@click="switchLanguage(); $refs.switchLanguage.blur()"
v-if="controlsActive"
>
<span :aria-label="$t('switchLanguageAlt')">{{ $root.$i18n.locale }}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ $lobby-border-radius: 0px;

@mixin focusTitle() {
position: relative;
&:focus {
&:focus, &:hover {
@include focusTitlePseudo();
}
@media (max-width: $mobile-plus - 1px) {
Expand Down

0 comments on commit 3a5b2a5

Please sign in to comment.