<?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>13011</bug_id>
          
          <creation_ts>2011-06-21 17:59:52 +0000</creation_ts>
          <short_desc>[editing] Encourage authors to use &quot;white-space: pre-wrap&quot; for contenteditable=&quot;&quot; and .designMode=true</short_desc>
          <delta_ts>2011-09-23 18:02:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#contenteditable</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50042</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-06-21 17:59:52 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Multipage: http://www.whatwg.org/C#contenteditable
Complete: http://www.whatwg.org/c#contenteditable

Comment:
Encourage authors to use &quot;white-space: pre-wrap&quot; for
contenteditable/designMode

Posted from: 68.175.61.233
User agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.794.0 Safari/535.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50043</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-06-21 18:09:35 +0000</bug_when>
    <thetext>Reasons discussed here:

http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-June/032187.html

Basically, using &quot;white-space: pre-wrap&quot; on the editable region and on the non-editable resulting content will make spaces behave much more reasonably and intuitively.  If you don&apos;t, nbsp has to be used for the sake of being non-collapsing, but also prevents breaking, which causes all sorts of minor issues.  Wording could be something along the lines of

&quot;Authors are encouraged to set white-space: pre-wrap on editable elements, and on markup that was originally created in editable elements.  Default HTML whitespace handling is not well suited to WYSIWYG editing, and line wrapping will not work correctly in some corner cases if white-space is left at its default value.&quot;

Example of a potential problem without pre-wrap: if the user types &quot;foo  bar&quot;, with two spaces in between, that will become either &quot;foo&amp;nbsp; bar&quot; or &quot;foo &amp;nbsp;bar&quot;.  In the first case, &quot;foo&amp;nbsp;&quot; might wrap to the next line even though &quot;foo&quot; alone could fit on the current line.  In the second case, if &quot;&amp;nbsp;bar&quot; starts a line, it will be visibly indented.

If white-space is pre-wrap, then all browsers but IE will not insert nbsp&apos;s at all, just regular spaces, so everything will behave much more sanely.  (But then you do have to use white-space: pre-wrap when you display the content later, too.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53408</commentid>
    <comment_count>2</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:13:33 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54874</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-13 05:38:53 +0000</bug_when>
    <thetext>Where should such advice go? If it&apos;s in one of the sections in your draft, it might be better just to put it there so it can be merged in later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55118</commentid>
    <comment_count>4</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-15 17:57:38 +0000</bug_when>
    <thetext>Currently you have the definition and authoring conformance requirements for contenteditable and designMode, and I don&apos;t intend to take those over at this point, so I think it makes sense to have this in HTML instead of the editing spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55779</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-24 22:13:50 +0000</bug_when>
    <thetext>Roger.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55924</commentid>
    <comment_count>6</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-28 15:28:36 +0000</bug_when>
    <thetext>Where did you fix this?  I don&apos;t see it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56255</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-03 19:56:23 +0000</bug_when>
    <thetext>It wasn&apos;t fixed. Not sure why I marked it resolved. My apologies. By &quot;Roger&quot; I just meant that I agreed and am intending to do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57213</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-23 00:15:26 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57214</commentid>
    <comment_count>9</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-23 00:17:17 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6570.
Check-in comment: Provide advice to authors regarding styling editing regions
http://html5.org/tools/web-apps-tracker?from=6569&amp;to=6570</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57242</commentid>
    <comment_count>10</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-09-23 18:02:40 +0000</bug_when>
    <thetext>Perfect, thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>