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

Cannot set tabindex on Textfield #191

Closed
aforemny opened this issue Aug 16, 2016 · 6 comments
Closed

Cannot set tabindex on Textfield #191

aforemny opened this issue Aug 16, 2016 · 6 comments

Comments

@aforemny
Copy link
Collaborator

aforemny commented Aug 16, 2016

I cannot set the Html.attributes.tabindex on a Textfield, because any options are set on the containing div. Or is there a way that I am missing?

I suppose we should expose a Textfield.tabindex : Int -> Textfield.Property m function.

@debois
Copy link
Owner

debois commented Aug 17, 2016

Yes.

Just to be sure, style won't help, somehow?
http://package.elm-lang.org/packages/debois/elm-mdl/7.4.0/Material-Textfield#style

Otherwise, for v7, we should just add this.

For master, it would be good to find a way to avoid wrapping so many attributes for input elements in Options. I don't how, though: we can't have users messing up our event handlers.

@OvermindDL1
Copy link
Contributor

Maybe it would be better to tag things a certain way? Like say Textfield could have another type in it like:

type Nodes
  = OuterContainer
  | InnerTextfield

Or so, then you could decorate the calls where it matters, like Options.cs Textfield.OuterContainer "blah" or Options.cs Textfield.InnerTextfield "blah". If the entirety of Options followed that then it would work well. You could have an Options.defaultNode as a fill-in for ones that have no thing to attach to or just want to attach to the default node whatever it may be, however that would probably require the above 'Textfield.Nodes` to come from a base type or something, or be a function call to build a specific value (or heck, just return an integer index of the field?).

@debois
Copy link
Owner

debois commented Aug 24, 2016

Can you even set tabindex through CSS?

@OvermindDL1
Copy link
Contributor

Can you even set tabindex through CSS?

Sadly no... It has to be on the element itself.

@debois
Copy link
Owner

debois commented Aug 25, 2016

Figures. We should look into what attributes we need to support one way or the other and try to figure out a general solution.

Let's continue discussion in more general terms at #208.

@debois
Copy link
Owner

debois commented Sep 9, 2016

Closing this; it'll be fixed by #213.

@debois debois closed this as completed Sep 9, 2016
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

3 participants