Skip to content
Travis Leithead edited this page Oct 16, 2015 · 1 revision

[01:54] Hello Masayuki

[01:55] garykac: hello

[01:56] <kochi_ho_> hello

[01:58] We're dialing into the the bridge, but we intend to use the chat room as much as possible for the discussion.

[01:58] It doesn't seem that Travis is here yet.

[02:00] I don't know how to use the Zakim commands as well as Travis, so we probably won't use them.

[02:00] The only Agenda item that I have is to go over the open bugs.

[02:00] I've started going through some of them, and have some fixes.

[02:01] Does anyone have any other issues to add to the agenda?

[02:01] (other than things being tracked in bugs)

[02:02] <kochi_ho_> beforeInput

[02:02] We need to discuss beforeinputevent vs. textInput event

[02:02] <real_wez> garykac: we have bug 22070 for that

[02:03] https://www.w3.org/Bugs/Public/show_bug.cgi?id=22070

[02:04] That bug is what we have so far for that issue. I was supposed to start an email thread to discuss this issue.

[02:04] Was there anything in particular you wanted to discuss about beforeInput

[02:06] I will send an email to the webapps group that summarizes the issues to initiate a discussion in a larger group of people.

[02:06] We raised a bunch of issues during our last confcall, and there were other concerns mentioned in the bug.

[02:06] I want to summarize both "sides" of the issue as best as I can.

[02:06] Kochi, did you have any preferences or concerns that you wanted to raise?

[02:07] concerns are that we should specify the order of the events

[02:07] Did you have a preference between beforeinputevent vs. textinput

[02:08] I'm here!

[02:08] Sorry about the wait..

[02:08] <kochi_ho_> hello Travis

[02:08] kochi says that beforeinput is cancelable while textinput is not.

[02:08] Going to call in momentarily...

[02:09] Actually, textinput needs to be cancelable since it is intended to be a replacement for keypress (which was cancelable).

[02:09] logging to http://www.w3.org/2013/07/31-webapps-irc

[02:09] RRSAgent: this is dom3

[02:09] I'm logging. I don't understand 'this is dom3', Travis. Try /msg RRSAgent help

[02:10] RRSAgent, this meeting spans midnight

[02:10] ok, Travis; I will not start a new log at midnight

[02:11] Spec should define the order of keydown, beforeinput, keypress and input for a key press and of keydown, compositionstart, beforeinput compositionupdate, compositionend, input.

[02:11] for IME.

[02:11] I like the order which I wrote above.

[02:12] Masayuki: agreed

[02:12] <kochi_ho_> sounds good

[02:12] Do we have any disagreement on the current proposal for beforeinput?

[02:12] Excellent, that was my next question. I was going to ask you about a preferred event order. ^_^

[02:12] <kochi_ho_> where is the definitive 'beforinput' proposal?

[02:12] Travis: only what's in 22070 and from our last teleconf

[02:14] I mentioned at last teleconf. Is the beforeinput is a good name? I mean that input is fired for any change of editor. However, before input should be fired only for the user input.

[02:15] The beforeinput event is supposed to be general.

[02:15] E.g., it shouldn't be fired for "Undo", "Redo" and "Paste".

[02:15] Yes

[02:15] I honestly can't think of a better name for it.

[02:16] "keyinput"?

[02:16] <kochi_ho_> yeah, speech or hand writing

[02:16] I think "userinput"?

[02:17] The textinput event is a special case of beforeinput.

[02:17] The name beforeinputevent was specified elsewhere (I forget which spec makes mention of it).

[02:18] I imagine that there was a big discussion before they came to consensus on beforeinputevent...

[02:19] What are people's preferences for beforeinputevent vs. textinput?

[02:20] <kochi_ho_> https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html mentions something on beforeInputEvent.

[02:20] If we have textinput, do we need to always have beforeinput?

[02:20] Is that generating too many events?

[02:21] textinput is already implemented on IE and WebKit by different way (IIRC). So, not using "textinput" doesn't cause any compatibility issues.

[02:22] <kochi_ho_> WebKit implements 'textInput'

[02:24] Yeah, I was confused by the case of "I" at writing testcase :(

[02:24] What are the differences between the proposals for textinput and beforeinput?

[02:24] textInput:

[02:24] <kochi_ho_> beforeinput is cancellable.

[02:24] textInput is not cancellable

[02:26] beforeinput doesn't give any indication of what has changed.

[02:26] What event interface does each use?

[02:27] IE had a "TextEvent" interface for "textInput" with fields for "data", "inputMethod", "locale".

[02:28] beforeinput would use what? KeyboardEvent?

[02:28] Event?

[02:28] beforeinput will need an event interface that contains the data that will be inserted (if not cancelled)

[02:29] I think that beforeinput should have attributes which stores inputting text, modifier key state and whether it's fired for key or composition.

[02:29] textinput = i'm only interested in keyboard event

[02:30] beforeinput = i'm interested for all user input

[02:30] Is this right?

[02:30] Travis: agree for the beforeinput

[02:31] If we merge these two together into beforeinput, does that cover most scenarios?

[02:32] Masayuki raised an issue in the bug about cutting/pasting.

[02:33] I understood that the main purpose of beforeinput is replacing keypress event and it's available for composition too.

[02:33] keypress is cancellable?

[02:33] garykac: Yes

[02:33] Travis: yes

[02:34] Our solution to replace keypress must be cancellable.

[02:35] If we made textinput cancelable, then it does effectively replace the keypress.

[02:37] Travis: it might be possible, but I worry about the compatibility issue with older textinput (textInput).

[02:37] Note to self: we can't just standardize keypress because we would need to change its behavior in a few areas (the return value for keyCode/charCode/firingorder?/) and those would break the web.

[02:38] <kochi_ho_> yeah, on WebKit textInput event is dispatched after DOM modification

[02:38] Masayuki: textInput was intended as a replacement for keypress (because keypress is not consistent across browsers). beforeinput is a general way of handling input events like textinput.

[02:39] Masayuki: Hence, it would be nice if we could merge textinput into beforeinput (to reduce the number of events fired).

[02:39] Do we really need both textinput and beforeinput to fullfill all scenarios?

[02:39] garykac: I don't think so.

[02:39] garykac: yes, therefore, I believe that defining new event, beforeinput, is the best way.

[02:43] Here's where I think we are:

[02:43] I think that we don't need to worry about the cost of firing textinput (textInput). If the cost is expensive, the browsers should check whether there is one or more event listeners for it.

[02:43] Add a definition for beforeinput into DOM3Events

[02:43] Make beforeinput cancellable

[02:43] Make beforeinput be associated with a new Event interface (BeforeInputEvent), which has at least one field for the "data"

[02:44] Travis: but it should NOT be cancellable while composition.

[02:44] Hmm, why?

[02:44] (Maybe "value" or "input" -- since "data" may already be in use)

[02:44] Masayuki: why not? what problems does it cause?

[02:44] Travis: because we have no way to cancel only one compositionupdate of native IME on any platforms.

[02:45] We can just make it cancelable immediately before compositionend, though.

[02:46] Could beforeinput be fired after compositionend?

[02:48] <kochi_ho_> typically on windows key events will be VK_PROCESS while IME is on

[02:48] compositionend is just a notification of the result of composition.

[02:49] I assume the each beforeinput should be followed by an 'input' event.

[02:50] So it seems that the events should be : keydown, ... compositionbegin/update/end ... beforeinput, input

[02:50] <kochi_ho_> garykac: agree

[02:50] Does that work? Not allowing beforeInput to fire until compositionend has signaled the end of the composition?

[02:51] That way we could cancel beforeinput without impacting the IME events

[02:51] garykac: If so, web apps cannot check the modified value with compositionupdate event, is it OK?

[02:52] If they want to see the modified IME events, can't they get that info from the composition events? That seems reasonable to me.

[02:52] I think that beforeinput should be fired immediately before compositionupdate (not cancellable) and immediately after compositionend (cancellable).

[02:53] What's the value of firing beforeinput before compositionupdate? Can't you get everything you need from the compositionupdate event?

[02:54] <kochi_ho_> masayuki: firing beforeinput before compositionupdate, and if the beforeinput event is cancelled, user agent doesn't fire compositionupdate and doesn't update .value either?

[02:54] That way, we don't have to define beforeinput as sometimes cancelable, but other times not-cancelable.

[02:55] garykac: I believe that it's worthwhile web apps can handle all user input only with beforeinput even during composition.

[02:56] <kochi_ho_> masayuki: yes, I agree

[02:56] kochi_ho_: I don't think so, even if preventDefault() of beforeinput before compositionupdate is called, browser don't change the later behavior.

[02:57] <kochi_ho_> masayuki: so compositionupdate will be dispatched anyway?

[02:57] During compositionupdate, no input is being proposed - it's just a candidate at that point. It's not about to be inserted until the compositionend event fires.

[02:57] So, technically, it doesn't seem like it's "input" yet.

[02:57] kochi_ho_: I think so.

[02:58] garykac: "input" event is also fired after compositionupdate.

[02:58] <kochi_ho_> masayuki: if beforeinput before compositionupdate is cancelled, that means the app doesn't want the .value to be modified, so if any DOM modification doesn't occur, compositionupdate won't fire either? no?

[02:59] <kochi_ho_> (if chrome/ff follow the order of composition update as IE9+)

[02:59] Masayuki: does it make sense for 'input' to fire after each compositionupdate? I'm not sure it does. what use cases does that support?

[03:00] <kochi_ho_> garykac: apps like google suggest can only have to handle input event?

[03:00] I think that the spec becomes a lot easier if the beforeinput/input events don't fire until after all the composition events are done.

[03:00] kochi_ho_: If browser doesn't modify compostion string in their editor, IME has modified composition string. Such difference shouldn't occur.

[03:01] <kochi_ho_> masayuki: ah, ok, so IME has the modified string anyway.

[03:01] kochi_ho: but apps should be able to ignore compositionevents if they're not interested in them. If beforeinput fires during the middle of composition, then I receive these extra beforeinput/input events that I'm not necessarily expecting.

[03:02] garykac: yes. like google suggest needs the input events after compositionupdate.

[03:02] I'm not sure it needs them. It could just have an eventhandler for compositonupdate events.

[03:03] kochi_ho: yes. If we allow such state, composition string and candidate list will be different.

[03:03] It seems like a slight convenience for an edge case at the cost of a much more complex event specification.

[03:03] <kochi_ho_> (I personally wish we have a spec that forbids modifying .value during composition...)

[03:04] garykac: anyway, currently, all browsers fire input event after compositionupdate, IIRC.

[03:04] But the 'input' event isn't specified anywhere!

[03:04] <kochi_ho_> masayuki: my idea for IME API is to allow js apps to draw composition string for composition update event, so beforeinput.preventDefault() can be used for the case.

[03:06] I'm unfortable having beforeinput sometimes not cancellable.

[03:07] kochi_ho_: if IME supports cancelling a compositionupdate, I don't think beforeinput before compositionupdate shouldn't be cancellable. But native IMEs are not cancellable per compositionupdate.

[03:08] kochi_ho: So calling beforeinput.preventDefault would stop the 'input' event. would it affect any of the composition events?

[03:08] <kochi_ho_> garykac: yes

[03:11] kochi_ho_: Hmm, sounds like browsers need to change the behavior whether the IME is native's or JS's.

[03:13] <kochi_ho_> masayuki: could you let me know the deatails offline (about native vs JS)?

[03:13] kochi_ho_: or JS IME API should have a method whether editor draws composition string automatically.

[03:14] kochi_ho_: Sure.

[03:14] <kochi_ho_> masayuki: ah, I meant the current state of IME API, which dropped the spec for writing IME in Javascript.

[03:14] It would be nice if JS IME's behaved the same as native IMEs. I don't know if that's reasonable...

[03:16] garykac: Applications (browsers) cannot touch composition if there is no API.

[03:17] We're going to need to wrap up.

[03:17] Sadly, we need to wrap up for today. I'm going to draft a doc that explores the different events being fired (and cancelled). I'll share this out so that we can discuss pros/cons.

[03:18] Thanks Gary.

[03:18] <kochi_ho_> thanks

[03:18] thanks

[03:18] We meet again on the phone in 2 weeks.

[03:18] Kochi_ho/masayuki: Thanks for your input/expertise.

[03:18] Perhaps we could have Gary's doc in 1 week over email to begin looking through?

[03:19] garykac: you're welcome.

[03:19] See you all next time: Aug 13, 2013!

[03:19] See you then!

[03:19] Ah, wait.

[03:19] The week is holiday week of Japan.

[03:19] <kochi_ho_> i'm available on that day

[03:20] I'm not :-(

[03:20] <kochi_ho_> aha!

[03:20] Let's find a time when we can all meet.

[03:21] masayuki: when will work better? +/- a week?

[03:21] Does August 6th work for everyone?

[03:21] Travis: Yes, and either is OK.

[03:21] <kochi_ho_> ok for me

[03:21] OK.

[03:22] Let's try for Aug. 6th!

[03:22] Done.

[03:22] Hurray. August 6th it is.

[03:22] Thank you!

[03:22] rrsagent, this is DOM3

[03:22] I'm logging. I don't understand 'this is DOM3', Travis. Try /msg RRSAgent help

[03:23] zakim, this was DOM3

[03:23] I don't understand 'this was DOM3', Travis

[03:24] RRSAgent, set logs public

[03:24] I have made the request, Travis

[03:25] Zakim, what conferences are active?

[03:25] I see no active conferences and none scheduled to start in the next 15 minutes

[03:25] zakim, this conference is "DOM3"

[03:25] sorry, Travis, I do not see a conference named '"DOM3"' in progress or scheduled at this time

[03:26] RRSAgent, make the minutes

[03:26] I have made the request to generate http://www.w3.org/2013/07/31-webapps-minutes.html Travis

[03:26] RRSAgent, set minutes public

[03:26] I'm logging. I don't understand 'set minutes public', Travis. Try /msg RRSAgent help

[03:27] RRSAgent, set logs public

[03:27] I have made the request, Travis

Clone this wiki locally