Instead of blocking all interaction, only block interaction in places

that matter
This commit is contained in:
Henry Jameson 2020-11-02 23:43:32 +02:00
parent f0a66448ee
commit e351665bb3
11 changed files with 45 additions and 2 deletions

View file

@ -120,5 +120,9 @@
color: $fallback--text; color: $fallback--text;
color: var(--text, $fallback--text); color: var(--text, $fallback--text);
} }
._misclick-prevention & {
pointer-events: none !important;
}
} }
</style> </style>

View file

@ -35,6 +35,10 @@
color: $fallback--cOrange; color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange); color: var(--cOrange, $fallback--cOrange);
} }
._misclick-prevention & {
pointer-events: none !important;
}
} }
&.-favorited { &.-favorited {

View file

@ -107,6 +107,10 @@
color: $fallback--text; color: $fallback--text;
color: var(--text, $fallback--text); color: var(--text, $fallback--text);
} }
._misclick-prevention & {
pointer-events: none !important;
}
} }
</style> </style>

View file

@ -34,6 +34,10 @@
color: $fallback--cBlue; color: $fallback--cBlue;
color: var(--cBlue, $fallback--cBlue); color: var(--cBlue, $fallback--cBlue);
} }
._misclick-prevention & {
pointer-events: none !important;
}
} }
} }
</style> </style>

View file

@ -45,6 +45,10 @@
color: $fallback--cGreen; color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen); color: var(--cGreen, $fallback--cGreen);
} }
._misclick-prevention & {
pointer-events: none !important;
}
} }
&.-repeated { &.-repeated {

View file

@ -59,6 +59,12 @@ $status-margin: 0.75em;
justify-content: flex-end; justify-content: flex-end;
} }
.user-avatar {
._misclick-prevention & {
pointer-events: none !important;
}
}
.left-side { .left-side {
margin-right: $status-margin; margin-right: $status-margin;
} }
@ -108,6 +114,10 @@ $status-margin: 0.75em;
a { a {
display: inline-block; display: inline-block;
word-break: break-all; word-break: break-all;
._misclick-prevention & {
pointer-events: none !important;
}
} }
} }
@ -250,6 +260,10 @@ $status-margin: 0.75em;
vertical-align: middle; vertical-align: middle;
object-fit: contain; object-fit: contain;
} }
._misclick-prevention & a {
pointer-events: none !important;
}
} }
.status-fadein { .status-fadein {

View file

@ -119,6 +119,7 @@
> >
<router-link <router-link
:to="userProfileLink" :to="userProfileLink"
class="user-avatar"
@click.stop.prevent.capture.native="toggleUserExpanded" @click.stop.prevent.capture.native="toggleUserExpanded"
> >
<UserAvatar <UserAvatar

View file

@ -240,6 +240,10 @@ $status-margin: 0.75em;
word-wrap: break-word; word-wrap: break-word;
word-break: break-word; word-break: break-word;
._misclick-prevention & :not(.attachments) a {
pointer-events: none !important;
}
blockquote { blockquote {
margin: 0.2em 0 0.2em 2em; margin: 0.2em 0 0.2em 2em;
font-style: italic; font-style: italic;

View file

@ -72,7 +72,7 @@ const Timeline = {
}, },
classes () { classes () {
let rootClasses = !this.embedded ? ['panel', 'panel-default'] : [] let rootClasses = !this.embedded ? ['panel', 'panel-default'] : []
if (this.blockingClicks) rootClasses = rootClasses.concat(['-blocked']) if (this.blockingClicks) rootClasses = rootClasses.concat(['-blocked', '_misclick-prevention'])
return { return {
root: rootClasses, root: rootClasses,
header: ['timeline-heading'].concat(!this.embedded ? ['panel-heading'] : []), header: ['timeline-heading'].concat(!this.embedded ? ['panel-heading'] : []),

View file

@ -113,7 +113,7 @@
} }
&.-blocked { &.-blocked {
pointer-events: none; cursor: progress;
} }
} }

View file

@ -282,6 +282,10 @@
.user-card { .user-card {
position: relative; position: relative;
._misclick-prevention & {
pointer-events: none !important;
}
&:hover .Avatar { &:hover .Avatar {
--_still-image-img-visibility: visible; --_still-image-img-visibility: visible;
--_still-image-canvas-visibility: hidden; --_still-image-canvas-visibility: hidden;