<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23422</bug_id>
          
          <creation_ts>2013-10-02 07:45:17 +0000</creation_ts>
          <short_desc>Adding a method to deliver editing-related events to a DOM element</short_desc>
          <delta_ts>2013-10-10 08:11:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - IME API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Takayoshi Kochi">kochi</reporter>
          <assigned_to name="Takayoshi Kochi">kochi</assigned_to>
          <cc>adrianba</cc>
    
    <cc>masayuki</cc>
    
    <cc>mike</cc>
    
    <cc>ojan</cc>
    
    <cc>public-webapps</cc>
    
    <cc>travil</cc>
    
    <cc>yoichio</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94158</commentid>
    <comment_count>0</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2013-10-02 07:45:17 +0000</bug_when>
    <thetext>In the current IME API WD (http://www.w3.org/TR/2013/WD-ime-api-20130815/ ,
section 8.2) using HTML5 &apos;inputmode&apos; attribute to specify that an element
wants editing related events (such as input, beforeinput, composition events)
but it sounded somewhat weird way to tell the hosting user agent in this way.

Instead, we propose to add a method to InputMethodContext, as

  bool requestEventDelivery();

to tell the target element wanting editing events delivered when it gets focus,
if the target element is a non-editable one (i.e. not &lt;input&gt;, &lt;textarea&gt;, or contenteditable).  By using this a developer can turn a DOM element to behave
like an editing element, to construct a DOM-based text editor.

If the user agent cannot fulfill the request, it can return false to indicate
that the request is failed.

We also might want to introduce another interface to undo the request:

  void refuseEventDelivery();

which should always succeed (as not delivering events is the default).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94190</commentid>
    <comment_count>1</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2013-10-02 18:22:48 +0000</bug_when>
    <thetext>What are the cases where the request would fail?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94220</commentid>
    <comment_count>2</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2013-10-03 03:56:27 +0000</bug_when>
    <thetext>(In reply to Ojan Vafai from comment #1)
&gt; What are the cases where the request would fail?

For example, an element embedding a plugin (notably Flash), which
user agents handle specially, may not be eligible for forwarding the
input events, as far as I can imagine, but such a case may be ignorable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94287</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2013-10-04 01:34:21 +0000</bug_when>
    <thetext>(In reply to Takayoshi Kochi from comment #2)
&gt; (In reply to Ojan Vafai from comment #1)
&gt; &gt; What are the cases where the request would fail?
&gt; 
&gt; For example, an element embedding a plugin (notably Flash), which
&gt; user agents handle specially, may not be eligible for forwarding the
&gt; input events, as far as I can imagine, but such a case may be ignorable.

The same argument applies to addEventListener(&apos;click&apos;) on such an element, right? It seems better to me to not make this a &quot;request&quot; style API. How about enableEditingEvents?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94301</commentid>
    <comment_count>4</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2013-10-04 08:05:52 +0000</bug_when>
    <thetext>(In reply to Ojan Vafai from comment #3)
&gt; &gt; &gt; What are the cases where the request would fail?
&gt; &gt; 
&gt; &gt; For example, an element embedding a plugin (notably Flash), which
&gt; &gt; user agents handle specially, may not be eligible for forwarding the
&gt; &gt; input events, as far as I can imagine, but such a case may be ignorable.
&gt; 
&gt; The same argument applies to addEventListener(&apos;click&apos;) on such an element,
&gt; right? It seems better to me to not make this a &quot;request&quot; style API. How
&gt; about enableEditingEvents?

Thanks for the suggestion, it sounds good to me.

Then do

  * enableEditingEvents()
  * disableEditingEvents()

sound good to you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94313</commentid>
    <comment_count>5</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2013-10-04 17:15:51 +0000</bug_when>
    <thetext>Sounds good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94548</commentid>
    <comment_count>6</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2013-10-10 08:11:58 +0000</bug_when>
    <thetext>Added enable/disableEditingEvents() at
https://dvcs.w3.org/hg/ime-api/rev/10a3d6ec9336</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>