WhoReacted, TypingIndicator: Fix triggering other actions (#3161)
Prevents typing in message user box from activating parent click handlers Fixes https://github.com/Vendicated/Vencord/issues/3128
This commit is contained in:
parent
68662c9625
commit
8fccda4a24
2 changed files with 20 additions and 12 deletions
|
@ -100,16 +100,24 @@ function TypingIndicator({ channelId, guildId }: { channelId: string; guildId: s
|
||||||
{props => (
|
{props => (
|
||||||
<div className="vc-typing-indicator" {...props}>
|
<div className="vc-typing-indicator" {...props}>
|
||||||
{((settings.store.indicatorMode & IndicatorMode.Avatars) === IndicatorMode.Avatars) && (
|
{((settings.store.indicatorMode & IndicatorMode.Avatars) === IndicatorMode.Avatars) && (
|
||||||
<UserSummaryItem
|
<div
|
||||||
users={typingUsersArray.map(id => UserStore.getUser(id))}
|
onClick={e => {
|
||||||
guildId={guildId}
|
e.stopPropagation();
|
||||||
renderIcon={false}
|
e.preventDefault();
|
||||||
max={3}
|
}}
|
||||||
showDefaultAvatarsForNullUsers
|
onKeyPress={e => e.stopPropagation()}
|
||||||
showUserPopout
|
>
|
||||||
size={16}
|
<UserSummaryItem
|
||||||
className="vc-typing-indicator-avatars"
|
users={typingUsersArray.map(id => UserStore.getUser(id))}
|
||||||
/>
|
guildId={guildId}
|
||||||
|
renderIcon={false}
|
||||||
|
max={3}
|
||||||
|
showDefaultAvatarsForNullUsers
|
||||||
|
showUserPopout
|
||||||
|
size={16}
|
||||||
|
className="vc-typing-indicator-avatars"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{((settings.store.indicatorMode & IndicatorMode.Dots) === IndicatorMode.Dots) && (
|
{((settings.store.indicatorMode & IndicatorMode.Dots) === IndicatorMode.Dots) && (
|
||||||
<div className="vc-typing-indicator-dots">
|
<div className="vc-typing-indicator-dots">
|
||||||
|
|
|
@ -93,7 +93,7 @@ function makeRenderMoreUsers(users: User[]) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClickAvatar(event: React.MouseEvent<HTMLElement, MouseEvent>) {
|
function handleClickAvatar(event: React.UIEvent<HTMLElement, Event>) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ export default definePlugin({
|
||||||
<div
|
<div
|
||||||
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
|
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
|
||||||
>
|
>
|
||||||
<div onClick={handleClickAvatar}>
|
<div onClick={handleClickAvatar} onKeyPress={handleClickAvatar}>
|
||||||
<UserSummaryItem
|
<UserSummaryItem
|
||||||
users={users}
|
users={users}
|
||||||
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
|
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
|
||||||
|
|
Loading…
Reference in a new issue