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

Save Button in File-Field #878

Closed
ruettenm opened this issue Oct 19, 2013 · 4 comments
Closed

Save Button in File-Field #878

ruettenm opened this issue Oct 19, 2013 · 4 comments

Comments

@ruettenm
Copy link

When you save an image the "save Button" from Image-Field is no longer visible.

file-upload-issue

@kinglozzer
Copy link
Member

Same issue as here: silverstripe/silverstripe-framework#2188.

@chillu The fix I put together for this is here: silverstripe/silverstripe-framework#2221. It essentially forces the iframe to re-calculate it's height if there's a validation message present.

P.s. similar issue/fix here: silverstripe/silverstripe-framework#2188 / silverstripe/silverstripe-framework#2222

@micmania1
Copy link
Contributor

This isn't always caused by the validation messages:

image

Is there any reason why we can't just add a scrollbar (overflow: auto)?

image

@kinglozzer
Copy link
Member

The height is specified inline (as it's calculated in the UploadField JavaScript) on the <iframe> element, as well as the div containing it. Setting overflow-y: scroll on the containing div causes the scroll bar to appear, but it still results in half of the 'save' button being cut off (see below).

In my opinion, if we're putting in the effort to calculate the height of the iframe, we should make sure we're calculating it correctly - it seems wrong to calculate the height, then set overflow: scroll anyway.

@micmania1 I can't seem to re-create your issue above where it's cut off without a validation message. Any steps to reproduce?

screen shot 2013-10-23 at 09 17 06

@chillu
Copy link
Member

chillu commented Oct 23, 2013

I would prefer is we just recalc the size on every iframe load, rather than hard coding assumptions about any DOM elements which might be responsible for a height change. Committed in silverstripe/silverstripe-framework@3422761

@chillu chillu closed this as completed Oct 23, 2013
bummzack pushed a commit to bummzack/silverstripe-framework that referenced this issue Oct 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants