<?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>20579</bug_id>
          
          <creation_ts>2013-01-06 16:46:10 +0000</creation_ts>
          <short_desc>Should entering designMode disable scripting for the document?</short_desc>
          <delta_ts>2013-03-14 00:36:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#making-entire-documents-editable:-the-designmode-idl-attribute</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ap</cc>
    
    <cc>ayg</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>ehsan</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>ojan</cc>
    
    <cc>rniwa</cc>
    
    <cc>travil</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80961</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-01-06 16:46:10 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Multipage: http://www.whatwg.org/C#making-entire-documents-editable:-the-designmode-idl-attribute
Complete: http://www.whatwg.org/c#making-entire-documents-editable:-the-designmode-idl-attribute

Comment:
Should entering designMode disable scripting for the document?

Posted from: 173.48.81.109 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20121217 Firefox/20.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80962</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-01-06 16:47:12 +0000</bug_when>
    <thetext>This testcase:

&lt;!DOCTYPE html&gt;
&lt;body onclick=&quot;alert(&apos;hey there&apos;)&quot;&gt;
  Click me: do I alert?
  &lt;script&gt;
    document.designMode = &quot;on&quot;;
  &lt;/script&gt;
  &lt;script&gt;
    alert(&apos;Hey, I still run&apos;);
  &lt;/script&gt;
&lt;/body&gt;

suggests non-WebKit UAs disable scripting in designmode: neither the second &lt;script&gt; nor the click handler run in IE9, Gecko, or Presto.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81113</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2013-01-09 12:17:43 +0000</bug_when>
    <thetext>For reference, my thoughts on the matter from some time ago:

https://bugzilla.mozilla.org/show_bug.cgi?id=765780#c7
http://lists.w3.org/Archives/Public/public-html/2011Jul/0069.html

If you decide to go like non-WebKit browsers and disable scripting, make sure to specify whether the current script runs to completion or not when designMode is turned on.  IE doesn&apos;t, last I checked (IE9) -- if you do

  &lt;script&gt;
  document.designMode = &quot;on&quot;;
  alert(&apos;First alert&apos;);
  &lt;/script&gt;
  &lt;script&gt;
  alert(&apos;Second alert&apos;);
  &lt;/script&gt;

then WebKit alerts both, Gecko/Opera only alert the first, and IE alerts neither.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84089</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-07 22:58:33 +0000</bug_when>
    <thetext>Since there&apos;s no complete interop here, I&apos;m very very sorely tempted to leave it as is (so in this case, matching WebKit, allowing script). It has the additional benefit of being the simplest of the options.

But I&apos;m certainly eager to entertain the alternatives, especially since not running script is more common, even if it is done differently in different browsers.

Is anyone aware of compat needs one way or the other?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84281</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-03-12 02:20:35 +0000</bug_when>
    <thetext>Note that I&apos;m contemplating changing the Gecko behavior to match WebKit here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84363</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-03-13 20:01:11 +0000</bug_when>
    <thetext>FWIW, IE is also contemplating moving to not disabling scripting in designMode (more closely matches contenteditable).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84381</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-14 00:36:28 +0000</bug_when>
    <thetext>Alright. I&apos;m marking this WORKSFORME for now then. Please reopen if either of you decide otherwise, ideally explaining why in a way that might convince the other browser vendors to agree with you. :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>