Skip to content

Commit

Permalink
fix(player): 初始化后无法点击问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Apr 30, 2024
1 parent b0333b8 commit 5c1b940
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ba-story-player/lib/BaStoryPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ function notifyWindowFocus() {
tabActivated.value = false;
}
function forceSetWindowFocus() {
if (!tabActivated.value) {
notifyWindowFocus();
}
}
onUnmounted(() => {
dispose();
window.removeEventListener("resize", updateFullScreenState);
Expand Down Expand Up @@ -425,6 +431,7 @@ onDeactivated(() => {
:player-height="playerHeight"
:player-width="playerWidth"
:style="{ width: `${playerWidth}px` }"
@click="forceSetWindowFocus"
>
</BaDialog>
</div>
Expand Down

0 comments on commit 5c1b940

Please sign in to comment.