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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24238</bug_id>
          
          <creation_ts>2009-02-27 11:08:12 -0800</creation_ts>
          <short_desc>Hitting delete in the first cell of an empty row of an empty table should delete the whole table</short_desc>
          <delta_ts>2022-11-17 18:58:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=173117</see_also>
          <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="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ayg</cc>
    
    <cc>jfernandez</cc>
    
    <cc>jparent</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>ojan</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111487</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-02-27 11:08:12 -0800</bug_when>
    <thetext>Hitting delete in the first cell of an empty row of an empty table should delete the whole table

I&apos;m not sure that WebKit&apos;s table editing paradigm is the right one yet, but at least it should be consistent.  he current behavior of hitting delete in the last empty row removes the row, which is useless.  it should remove the whole table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111489</commentid>
    <comment_count>1</comment_count>
      <attachid>28090</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-02-27 11:08:24 -0800</bug_when>
    <thetext>Created attachment 28090
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111559</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-02-27 15:02:57 -0800</bug_when>
    <thetext>Still reproduces in Safari 4 (I filed this bug from Safari 3, eek!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189814</commentid>
    <comment_count>3</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2010-02-11 15:28:26 -0800</bug_when>
    <thetext>Behavior seems to have changed.  No longer deletes the empty row (nor does it delete the whole table).  The current behavior seems correct to me though - why do you want it to delete the whole table?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1317090</commentid>
    <comment_count>4</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-06-08 15:21:27 -0700</bug_when>
    <thetext>I cannot reproduce this bug in ToT. As indicated in comment #3, it doesn&apos;t delete the table either, which matches Firefox&apos;s current behavior. IE also behaves like FF.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1317100</commentid>
    <comment_count>5</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-06-08 15:32:16 -0700</bug_when>
    <thetext>The table is deleted if there is just one cell. Attached test case to reproduce the issue, which may be a different bug (which contradict the expected behavior of this issue). 

I filed bug #173117 to match the behavior of the other engines, but perhaps we should clarify what should be the expected behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1317101</commentid>
    <comment_count>6</comment_count>
      <attachid>312355</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-06-08 15:35:14 -0700</bug_when>
    <thetext>Created attachment 312355
New test case deleting the whole table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913348</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-17 17:53:56 -0800</bug_when>
    <thetext>Using &quot;new test case&quot;, I am not able to reproduce this bug in Safari Technology Preview 158 and it behaves same as other browsers (Chrome Canary 110 and Firefox Nightly 109), where if you place cursors inside the table and delete, it delete the letter inside of the table but does not delete &apos;table&apos; and if you type, it just starting typing within Table. If I place selection / caret outside of table and then press &quot;backspace&quot; / &quot;delete&quot;, it first select table and then on second press, it delete table and left with &lt;br&gt; output similar to Chrome Canary 110 in Safari 16.1. Although &quot;Firefox Nightly 109&quot;, you cannot delete table while trying to do &quot;backspace&quot; / &quot;delete&quot;, while keeping selection outside of the table.

Since all browsers are behaving same as long as the selection is inside, I think we can mark this bug as &quot;RESOLVED CONFIGURATION CHANGED&quot;, while for deletion of table while selection being outside, I am not sure whether we need to align with Firefox or not or Firefox need to align with Chrome &amp; Safari.

I will tag others to comment and mark this bug accordingly. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>28090</attachid>
            <date>2009-02-27 11:08:24 -0800</date>
            <delta_ts>2009-02-27 11:08:24 -0800</delta_ts>
            <desc>test case</desc>
            <filename>table.html</filename>
            <type>text/html</type>
            <size>855</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PGRpdj5IaXR0aW5nIGRlbGV0ZSBpbiB0aGUgZmlyc3QgY2VsbCBvbmx5IGRlbGV0ZXMgdGhlIHJv
dywgbm90IHRoZSB3aG9sZSB0YWJsZS4gIFlvdSdyZSBsZWZ0IHdpdGggeW91ciBjdXJzb3IgaW5z
aWRlIGEgdGFibGUgdGhhdCB5b3UgY2FuJ3QgYWN0dWFsbHkgZG8gYW55dGhpbmcgd2l0aCEgIFdo
ZW4geW91IHRyeSB0byB0eXBlLCB3ZSBtb3ZlIHlvdXIgY3Vyc29yIG91dCBvZiB0aGUgdGFibGUu
PC9kaXY+CjxkaXYgaWQ9ImNvbnRlbnQiIGNvbnRlbnRFZGl0YWJsZT48dGFibGUgYm9yZGVyPSIx
IiBjZWxscGFkZGluZz0iMiIgY2VsbHNwYWNpbmc9IjIiPjx0Ym9keT48dHI+PHRkIGlkPSJmaXJz
dCI+PGJyPjwvdGQ+PHRkIGlkPSJzZWNvbmQiPjxicj48L3RkPjwvdHI+PC90Ym9keT48L3RhYmxl
PjwvZGl2Pgo8cD5Db250ZW50OjwvcD4KPHByZSBpZD0idmlldyI+PC9wcmU+Cgo8c2NyaXB0PgoK
ZnVuY3Rpb24gdXBkYXRlSW5uZXJIVE1MVmlldygpCnsKICAgIHZhciB2aWV3ID0gZG9jdW1lbnQu
Z2V0RWxlbWVudEJ5SWQoInZpZXciKTsKICAgIHZpZXcuaW5uZXJIVE1MID0gIiI7CiAgICB2YXIg
Y29udGVudERpdiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJjb250ZW50Iik7CiAgICB2aWV3
LmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGNvbnRlbnREaXYuaW5uZXJIVE1M
KSk7Cn0KdmFyIGNvbnRlbnREaXYgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiY29udGVudCIp
Owpjb250ZW50RGl2LmFkZEV2ZW50TGlzdGVuZXIoIkRPTVN1YnRyZWVNb2RpZmllZCIsIHVwZGF0
ZUlubmVySFRNTFZpZXcsIHRydWUpOwoKdXBkYXRlSW5uZXJIVE1MVmlldygpOwo8L3NjcmlwdD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>312355</attachid>
            <date>2017-06-08 15:35:14 -0700</date>
            <delta_ts>2017-06-08 15:35:48 -0700</delta_ts>
            <desc>New test case deleting the whole table.</desc>
            <filename>singleCellDelete-3.html</filename>
            <type>text/html</type>
            <size>819</size>
            <attacher name="Javier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