Poll height on mobile with image content


(Dean Taylor) #1

Continuing the discussion from Polls don't fit on mobile:

I’ve just reproduced this issue on try.discourse.org (obviously it’s likely to be reset soon):

Screen grab:

Here is the relevant post raw code I used:

[poll name=with_content]
- My first image <img src="//discourse-meta.s3-us-west-1.amazonaws.com/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png" height="100">
- Emoji: :smile: 

[poll name=with_content2]
- My first image <img src="//discourse-meta.s3-us-west-1.amazonaws.com/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png" height="150">
- Emoji: :smile: 
[poll name=with_content3]
- My first image <img src="//discourse-meta.s3-us-west-1.amazonaws.com/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png">
- Emoji: :smile: 

Images on polls do not work properly in beta 6
(Régis Hanol) #2

I have on my TODO list to whitelist elements available inside poll options and the more I think about it, the less likely I am to whitelist images and links. Right now, I’m thinking only allowing emojis.

(Dean Taylor) #3

On one of the forums polls currently specifically for voting for images of cars - without images polls would be useless to me (that forum).

It works well without the fixed height style attribute.

(Jeff Atwood) #4

Not so, you could do this

Image of cat named Tiger

Image of cat named Fluffy

Image of cat named Lady

[ Poll ]

  • Vote for Tiger
  • Vote for Fluffy
  • Vote for Lady

I agree that allowing images inside the buttons is a whole can of worms we don’t want to get into

(cpradio) #5

That is actually what we used to do on vBulletin. Post the images above and poll below it for them to choose which they liked best (the images were never part of the poll itself)

(Dean Taylor) #6

We tried this - it doesn’t work well as cars don’t have names - it gives a bad user experience saying “A”, “B”, “C” - clicking images is best.

(Jeff Atwood) #7

Too problematic for layout – sorry.

(Dean Taylor) #8

Is it possible to use something like this to get the correct height when the images are loaded?

(Jeff Atwood) #9