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

Move inputmode to not be dependent on forms #1897

Closed
dtapuska opened this issue Oct 13, 2016 · 12 comments
Closed

Move inputmode to not be dependent on forms #1897

dtapuska opened this issue Oct 13, 2016 · 12 comments

Comments

@dtapuska
Copy link
Contributor

dtapuska commented Oct 13, 2016

inputmode should apply to editing hosts as well as text based form controls. I'd prefer it wasn't inside the forms section. Perhaps there are other things as well that are applicable to content-editable.

This was discussed at TPAC in the editing group and it was indicated to just get the HTML spec updated.

@annevk How do you want to rejig the spec so that inputmode can be used on editing-hosts?

@domenic
Copy link
Member

domenic commented Oct 13, 2016

Very interesting. Other possibilities: autocomplete, autofocus. (I wonder why autofocus is nested under the "Form submission" section.)

I guess those sections would move under 6.6 Editing. Their wording will need to be rejiggered to talk less about form controls, and more about whatever we end up calling editable controls per #1892. Some new examples would be good.

And I guess all the element definitions that say that these attributes apply to only certain elements would need to remove that line, and they would need to move to the "Global attributes" section. Then the individual sections would need a conformance requirement saying that they are only used on editable controls.

First step is deciding which attributes beyond inputmode we want to move, IMO.

@dtapuska
Copy link
Contributor Author

Personally I'd say autofocus, inputmode and https://rawgit.com/dtapuska/action-hint/master/index.html (eventually).

I'm not sure autocomplete is a great fit for content-editable at this time.

@annevk
Copy link
Member

annevk commented Oct 14, 2016

Do we have agreement on inputmode at this point? @mounirlamouri raised various issues around it in the past (and also suggested standardizing some of Apple's proprietary attributes in that area) and I don't think we've addressed any of that thus far.

Related:

@domenic
Copy link
Member

domenic commented Oct 14, 2016

I think there is a separable issue where we revise inputmode to be more in line with what browsers are interested in implementing. But indeed, I'm not sure of its current implementation status; maybe one path here is to remove inputmode entirely, then re-add it when it has multi-implementer interest, and at that time put it in a more general section.

@dtapuska
Copy link
Contributor Author

dtapuska commented Oct 14, 2016

My proposal presented at TPAC editing was https://rawgit.com/dtapuska/inputmode/master/index.html

It was decided that a separate spec shouldn't be written but we do it as a bunch of issues on the HTML spec. That is what motivated this issue.

My proposal adds a few additional keywords and don't implement some that are irrelevant on android. However I do see that some of them actually are supported by TSF so I'm not opposed to leaving some that already are there in if there was a strong desire from the community.

@mounirlamouri
Copy link
Member

I think splitting capitalization behaviour and script specific types away from inputmode would be good.

@domenic would you be supportive of a pull request that adds autocapitalize to HTML?

@domenic
Copy link
Member

domenic commented Oct 15, 2016

I think splitting capitalization behaviour and script specific types away from inputmode would be good.

I realize this is probably an old discussion, so please feel free to link me somewhere it's been discussed previously, but why is that? Naively, they seem to fit together well.

would you be supportive of a pull request that adds autocapitalize to HTML?

Is there multi-vendor interest in it, and agreement on its behavior? If so, is there no strong opposition from other vendors? Those are generally the criteria. I suspect autocapitalize meets them, but you'd know better than me :). Also keep in mind that these days we are strongly encouraging tests with any pull requests, although I guess this might be an exception since it's not really testable except manually :(

@dtapuska
Copy link
Contributor Author

@smaug---- I don't know who from Mozilla is relevant for Editing here.
@rniwa Can you comment on your support to move these things around? (autofocus, autocomplete, autocapitalize, inputmode)

On Android we don't have control over what type of script is supported on the virtual keyboard that I am aware of. So I don't really care to support all of those (see my initial proposal). But I understand that TSF (Microsoft's Text Services Framework) does support script information so I'm not opposed to keeping those values.

I do want to move this forward as this has been a topic for Polymer for some time now.

@smaug----
Copy link
Collaborator

smaug---- commented Oct 19, 2016

Should this go to the proposed <contenteditable> only, not all the contenteditable stuff?
It was sort of agreed, or at least discussed that no new features should go to the old contenteditable.

@masayuki-nakano might have opinion on this.

@dtapuska
Copy link
Contributor Author

@smaug---- I don't see <contenteditable> in the spec or any pull requests for adding this element. Where is the spec? To block this support on us collectively specifying contenteditable from the start seems like it would be a disservice to delivering a rich web experience.

@masayuki-nakano
Copy link

Although, as far as I know, nobody finishes implementing inputmode, I like making such attributes which are useful with <input type="text"> available with contentedtiable's editing host (like autofocus too).

So, for example,

<div contenteditable inputmode="latin">
  <p inputmode="latin-name"></p>
  <p inputmode="numeric"></p>
</div>

In this case, even if caret is in a <p>, these inputmode should be ignored because if browsers need to respect them, browsers needs to climbing up the tree from caret position at every selection change and it's unclear to respect which input mode when selection is not collapsed and across some inputmode attributes.

@smaug----
Copy link
Collaborator

@dtapuska I don't think there is a spec yet (not that there is a proper spec for contenteditable attribute either). was discussed during tpac, and new features should be exposed only there - that was at least the idea at that point. Better to ask editing task force folks about that.

alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Move the inputmode attribute definition into the editing section
so that we can declare it in the ContentEditable IDL, and allow it as a
global attribute. Closes whatwg#1897.

Remove the prose concept from inputmode (ie. latin, kana) since it
hasn't been implemented and is not possible to implement in current
virtual keyboard implementations. Closes whatwg#3077, by resolving to do this
subsetting instead of full removal. Similarly closes whatwg#1626 by
establishing inputmode="numeric" as the solution.

Tests: web-platform-tests/wpt#8690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants