Browse Source

Fix opening/closing gifv sometimes making the timeline scroll

closed-social-glitch-2
Thibaut Girka 5 years ago
committed by ThibG
parent
commit
fbec0edf08
3 changed files with 2 additions and 7 deletions
  1. +0
    -6
      app/javascript/flavours/glitch/components/media_gallery.js
  2. +1
    -1
      app/javascript/flavours/glitch/components/modal_root.js
  3. +1
    -0
      app/javascript/flavours/glitch/styles/components/media.scss

+ 0
- 6
app/javascript/flavours/glitch/components/media_gallery.js View File

@ -82,11 +82,6 @@ class Item extends React.PureComponent {
e.stopPropagation();
}
handleMouseDown = (e) => {
e.preventDefault();
e.stopPropagation();
}
render () {
const { attachment, index, size, standalone, letterbox, displayWidth } = this.props;
@ -190,7 +185,6 @@ class Item extends React.PureComponent {
onClick={this.handleClick}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
onMouseDown={this.handleMouseDown}
autoPlay={autoPlay}
loop
muted

+ 1
- 1
app/javascript/flavours/glitch/components/modal_root.js View File

@ -40,7 +40,7 @@ export default class ModalRoot extends React.PureComponent {
this.setState({ revealed: false });
}
if (!nextProps.children && !!this.props.children) {
this.activeElement.focus();
this.activeElement.focus({ preventScroll: true });
this.activeElement = null;
}
}

+ 1
- 0
app/javascript/flavours/glitch/styles/components/media.scss View File

@ -147,6 +147,7 @@
position: relative;
z-index: 1;
object-fit: contain;
user-select: none;
&:not(.letterbox) {
height: 100%;

Loading…
Cancel
Save