Bug 24238 - Hitting delete in the first cell of an empty row of an empty table should delete the whole table
Summary: Hitting delete in the first cell of an empty row of an empty table should del...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-27 11:08 PST by Eric Seidel (no email)
Modified: 2022-11-17 18:58 PST (History)
7 users (show)

See Also:


Attachments
test case (855 bytes, text/html)
2009-02-27 11:08 PST, Eric Seidel (no email)
no flags Details
New test case deleting the whole table. (819 bytes, text/html)
2017-06-08 15:35 PDT, Javier Fernandez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-02-27 11:08:12 PST
Hitting delete in the first cell of an empty row of an empty table should delete the whole table

I'm not sure that WebKit'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.
Comment 1 Eric Seidel (no email) 2009-02-27 11:08:24 PST
Created attachment 28090 [details]
test case
Comment 2 Eric Seidel (no email) 2009-02-27 15:02:57 PST
Still reproduces in Safari 4 (I filed this bug from Safari 3, eek!)
Comment 3 Julie Parent 2010-02-11 15:28:26 PST
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?
Comment 4 Javier Fernandez 2017-06-08 15:21:27 PDT
I cannot reproduce this bug in ToT. As indicated in comment #3, it doesn't delete the table either, which matches Firefox's current behavior. IE also behaves like FF.
Comment 5 Javier Fernandez 2017-06-08 15:32:16 PDT
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.
Comment 6 Javier Fernandez 2017-06-08 15:35:14 PDT
Created attachment 312355 [details]
New test case deleting the whole table.
Comment 7 Ahmad Saleem 2022-11-17 17:53:56 PST
Using "new test case", 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 'table' and if you type, it just starting typing within Table. If I place selection / caret outside of table and then press "backspace" / "delete", it first select table and then on second press, it delete table and left with <br> output similar to Chrome Canary 110 in Safari 16.1. Although "Firefox Nightly 109", you cannot delete table while trying to do "backspace" / "delete", 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 "RESOLVED CONFIGURATION CHANGED", 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 & Safari.

I will tag others to comment and mark this bug accordingly. Thanks!