chemerisuk / better-placeholder-polyfill

Placeholder attribute polyfill for better-dom
http://chemerisuk.github.io/better-placeholder-polyfill/
MIT License
22 stars 5 forks source link

Cannot affect placeholder position within the input. #1

Closed richpeniche closed 10 years ago

richpeniche commented 10 years ago

The placeholder text is located on the top left corner of the input and neither line-height nor padding seem to do affect its position.

chemerisuk commented 10 years ago

Could you describe the use-case you have? Currently for the placeholder text an extra input is used and it should inherit regular input padding/border widths.

richpeniche commented 10 years ago

It seems that the style is not being inherited (http://cl.ly/image/0J2b2M0F1s01) I've filled the first two inputs. The third one shows how the placeholders are appearing.

I'm testing this on IE in Windows XP. This is my code (I removed < and > for posting reasons):

input name="user[name]" type="text" class="m_field l_field" id="name" name="name" placeholder="Tu nombre" class="" required input type="email" name="user[email]" class="m_field l_field" id="email" name="email" placeholder="Email" required input type="password" name="user[password]" class="m_field l_field" id="password" name="password" placeholder="Contraseña" required

chemerisuk commented 10 years ago

Alright, I bet this is because your inputs have additional l_field or m_field that makes them different. Just pushed a new version 1.1.0-rc.4 that respects font, padding, border-width and text-align of particular <input> or <textarea>. Could you check if it works for you?

richpeniche commented 10 years ago

The styles seem to be working now but something funny just happen with the placeholders

ie8 inputs ii

They seem sort of sliced.

chemerisuk commented 10 years ago

Huh, interesting. Could you post css styles of a problematic input here?

richpeniche commented 10 years ago

Sure! Here it is the generated inline code (is this what you need?):

box-sizing: border-box; position: absolute; border-bottom-color: transparent; text-align: left; padding-bottom: 0px; border-right-width: 1px; border-top-color: transparent; padding-left: 14px; width: 252px; padding-right: 14px; font: 15px/38px "Lato", sans-serif; background: no-repeat 0px 0px; border-top-width: 1px; border-bottom-width: 1px; color: graytext; border-right-color: transparent; border-left-color: transparent; border-left-width: 1px; padding-top: 0px;

chemerisuk commented 10 years ago

yep, such form is ok, but it looks like you pasted css of the placeholder not the input itself.. Target input should have name attribute

chemerisuk commented 10 years ago

Nevermind, seems like I reproduced the issue. Check if 1.1.0-rc.5 works for you.

richpeniche commented 10 years ago

I'm sorry but the last changes didn't seem to do anything different. What should I expect?

chemerisuk commented 10 years ago

The last issue should be fixed :). Make sure that you have @version 1.1.0-rc.5 in the top of the file. If it's fine I need css of the input with name to investigate.

richpeniche commented 10 years ago

Eres un chingón. (Thats "You are awesome" in Spanish). My input placeholders look good now.

chemerisuk commented 10 years ago

Great! Thanks for the bug and good night :)

richpeniche commented 10 years ago

Hey. Something funny just happened. Your latest fix did worked for some inputs in my landing page but not for others...

If you click on this button ( captura de pantalla 2013-11-29 a la s 13 12 57 ) on www.conekta.io a modal will pop-up and there you can see that the placeholder still appears incomplete.

I'm testing this on Windows XP IE8

chemerisuk commented 10 years ago

Hi! Check if 1.1.0-rc.6 solves the problem. Thanks for the bug!

richpeniche commented 10 years ago

It worked. Awesome. Thanks, man.

richpeniche commented 10 years ago

Hello again, Maksim. I don't know if I'm doing something wrong (or not) but the plugin works well on our landing page but it remains slicing other placeholders in the site.

Do you think you could check it up?. This is my html and this is how it looks.

Hope you could help.

chemerisuk commented 10 years ago

Hi! Could you make a screenshot and provide steps that were used to get the problematic page?

richpeniche commented 10 years ago

Hi. Sorry for the delay. We just pushed our last IE changes to production. This is how you will get there:

  1. Go to conekta.io
  2. Click on this button

captura de pantalla 2013-12-04 a la s 18 33 52

  1. Fill the form. Fields are:
    • Name
    • Email
    • Password
    • Confirm password
    • Accept Terms of Service

captura de pantalla 2013-12-04 a la s 18 34 03

  1. Once registered, use this url https://admin.conekta.io/#config.fiscal_update, and there you are.
chemerisuk commented 10 years ago

I tried to register in IE8 and noticed bunch of errors like below:

Message: Access is denied to: https://s3.amazonaws.com/developer-admin/javascripts/better-dom.htc
Line: 0
Char: 0
Code: 0
URI: https://www.conekta.io/

It looks like you put the htc file on different domain, that is not acceptable. Take a look at the note about old IEs support. Could be the cause of your problem.

richpeniche commented 10 years ago

Thanks man. I'll check that up.