kenkeiter / skeuocard

Skeuocard progressively enhances credit card inputs to provide a skeuomorphic interface.
http://kenkeiter.com/skeuocard/
MIT License
3.23k stars 231 forks source link

when skeuocard is positioned below the fold of the browser #115

Open dylanjha opened 10 years ago

dylanjha commented 10 years ago

on page load the browser scrolls to put the skeuocard into view

guessing this has to do with focusing the field automatically at instantiation time... digging around to try and confirm that hunch.

dylanjha commented 10 years ago

confirmed... I think I would like an initialization option dontFocus: true, that would prevent focus on initialization. do you support that?

frankfjf commented 10 years ago

Having the same problem. Is there anyway to disable the initial autofocusing without breaking the other behavior of the form?

dylanjha commented 10 years ago

I had to get this problem solved urgently, so I had a really nasty monkey patch you can see here:

https://github.com/mattnish/skeuocard-rails/commit/ec7c295f76faed766badd73a64f781bdebc81f3d

I wouldn't recommend using this code, unless you're really in a bind.

I want to go back and make an actual fix for it, if I get around to it, I'll put in a PR

frankfjf commented 10 years ago

Thanks a lot. I might use this in the meantime since I also need it kind of urgently.

dylanjha commented 10 years ago

@kenkeiter are you still supporting this project? and what are your thoughts about an initialization options {dontFocus: true} ? If you support that as an enhancement, I'd be happy to give it a shot.

kenkeiter commented 10 years ago

I will be, yes -- sorry for the delay; I've recently joined a new company and haven't gotten back into the swing of giving my projects the attention they deserve.

The reason I haven't been accepting peoples' PRs is because they aren't reading the documentation which states (specifically) that all PRs must be submitted on the develop branch -- this is because master should always reflect a stable (production-ready) release :)

I've been operating under the assumption that people are simply cherry-picking the PRs they want and applying them to a fork, which seems like a good solution until I get around to correcting/merging all the PRs manually :)

kenkeiter commented 10 years ago

As an aside, @dylanjha, I really appreciate your effort on this project. I hope it's been useful to you. If you can submit a good PR on develop I'm more than happy to accept your enhancement :)

dylanjha commented 10 years ago

no problem. thanks for the reply. and thanks for this awesome library :+1: I'm loving it.

argyleink commented 10 years ago

awesome, this is a great new option

dylanjha commented 10 years ago

development should be merged into master @kenkeiter

kenkeiter commented 10 years ago

I'll get that done tonight! Thanks for the hard work, @dylanjha!