Open Bug 185900 Opened 22 years ago Updated 2 years ago

ctrl+click on a table cell followed by ctrl+shift+click on another table cell should select all cells in between

Categories

(Core :: DOM: Selection, defect)

All
Linux
defect

Tracking

()

People

(Reporter: nlevitt, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021108
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021108

When I ctrl-click on a table cell, it selects it. Then I ctrl-shift-click on
another table cell, and it selects everything in between. Very nice. But when I
paste to any application by middle-clicking, it only pastes the contents of the
two table cells I actually clicked on, and not of the ones between, which all
appear to be selected.

However, copy/paste using the clipboard works correctly. The problem apparently
applies only to the X selection.

Reproducible: Always

Steps to Reproduce:
1. Open a page with tables with text data in them. (e.g. http://mozilla.org/)
2. Ctrl-click on a table cell. (Roadmap, on the left)
3. Ctrl-shift-click on another table cell in the same table. (Build It) 
4. Open something you can paste into, like a text editor. Middle-click.
Actual Results:  
Only the contents of the cells you clicked on will be pasted. (Roadmap  Build It)


Expected Results:  
The contents of all the cells that are selected should be pasted; =it should
behave the same way as copy/paste. (In my example case:  Roadmap  Projects 
Ports  Module Owners  Hacking  Get the Source  Build It)
Component: Localization → Layout: Tables
Reassign to default owner for Layout: tables.
Assignee: rchen → table
QA Contact: ylong → amar
Fowarding this to correct component event "handling".
QA Contact: amar → trix
wfm winxp 2004012808
I see this, too Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7a) Gecko/20040202

Bernd, there is no middle click paste in winxp, afaik?!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 144260
CTRL-C CTRL-V works, its only the X clipboard that does not work. This is a
selection bug.
Assignee: core.layout.tables → selection
Component: Layout: Tables → Selection
Assignee: selection → nobody
QA Contact: trix → selection
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100510 Lightning/1.1a1pre SeaMonkey/2.1a1pre - Build ID: 20100510003927

I can still reproduce this with the example at http://lxr.mozilla.org/seamonkey/source/layout/html/tests/table/marvin/tables_cellpadding.html -- neither Ctrl-Shift-click nor Shift-click select any intervening cells between what was selected previously and the newly selected cell, so middle-clicking pastes only the clicked cells, not any intervening cells. (Bug or Feature? I don't know.)
The original symptoms might have been a painting bug, the intervening cells we're
never really part of the selection.  As noted in comment 6, the two cells that are
selected after ctrl+shift+click are pasted correctly.

The current behavior makes impossible to select a range of cells as the OP was
trying to do.  We could change ctrl+shift+click to have this behavior:

If the current selection is a "table selection"
  extend the selection to include whole cells/rows
else
  extend the selection as normal (non-table behavior)

This would make it possible to select some text (possibly inside a table) and
then ctrl+shift+click somewhere in a table, and that would select stuff as in
other UAs that doesn't have the special table selection we have.
That is, you would have to first do a ctrl+click to invoke our special table
selection for ctrl+shift+click.  I think that would be an improvement since
it avoids triggering unintended table selection on ctrl+shift+click.

Thoughts?
Summary: ctrl-click on a table cell followed by ctrl-shift-click on another table cell followed by a middle-click paste elsewhere does not paste all of the selected table cell contents → ctrl+click on a table cell followed by ctrl+shift+click on another table cell should select all cells in between
That sounds good to me.
Webcompat Priority: --- → ?

The issue can be reproduced with an arbitrary table, e.g. https://www.w3schools.com/html/html_tables.asp.

Webcompat Priority: ? → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.