Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filepond--root's height doesn't seem to be updating on window resize #320

Closed
gaiustemple opened this issue May 20, 2019 · 3 comments
Closed

Comments

@gaiustemple
Copy link

const avatarInput = FilePond.create(
  document.querySelector('.filepond'),
    {
      server: {
        ...
      },
      labelIdle: `Drag & Drop your avatar or <span class="filepond--label-action">Browse</span>`,
      imagePreviewHeight: 170,
      imageCropAspectRatio: '1:1',
      imageResizeTargetWidth: 200,
      imageResizeTargetHeight: 200,
      stylePanelLayout: 'compact circle',
      styleLoadIndicatorPosition: 'center bottom',
      styleButtonRemoveItemPosition: 'center bottom',
      files: [
        {
          source: 'user_avatar_file.jpg',
          options: {
            type: 'local'
          }
        }
      ]
    }
);

Summary

When the size of the FilePond is relative to the viewport (i.e. 20vw) meaning that it will change width on window resize, the .filepond--root element doesn't seem to update it's height. The .filepond--item does however resize correctly (but it means that the border sticks out from the edge, or cuts off the image depending on which way the browser is resized as per images).
Refreshing the page sets it back to normal.
Screenshot 2019-05-20 at 10 39 33
Screenshot 2019-05-20 at 10 39 42
Screenshot 2019-05-20 at 11 12 37

Expected behaviour

.filepond--root should resize too?

Environment Version
OS MacOS
Device MacBook Pro
Browser Safari 12.1
@rikschennink
Copy link
Collaborator

It should update but I believe it currently doesn't

@rikschennink
Copy link
Collaborator

rikschennink commented May 27, 2019

Should be fixed in latest release, please confirm
https://github.com/pqina/filepond/releases/tag/4.4.8

@gaiustemple
Copy link
Author

Yep, spot on works great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants