question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataTable: selecting text values in tablecell shows weird behavior when using tablewide row selection

See original GitHub issue

1) Environment

  • PrimeFaces version: PrimeFaces-7.0.RC3 on Mojarra-2.3.2 (is reproducible in the “Showcase” on the official page at the time of writing - see https://primefaces.org/showcase/ui/data/datatable/selection.xhtml)
  • Does it work on the newest released PrimeFaces version? As stated above, reproducible in the showcase
  • Does it work on the newest sources in GitHub? Not tested, I presume not.
  • Application server + version: See Showcase
  • Affected browsers: Firefox 66.0.1, Chromium 73.0.3683.75 - both on Linux Mint 19.1

2) Expected behavior

This is difficult to explain because of the 2 “selections” playing in on this, but I’ll try. I’ll differentiate between row-select (i.e. click on a row to select it) and text-select (i.e. click-and-drag the mousepointer over a portion of text).

When a DataTable is used with the row-select feature (i.e. “selection”, both single and multiple), it gets hard to text-select (i.e. click-and-drag) a cell’s content.

I’d expect, that if I text-select a value in a cell, this value is then selected - i.e. in this case both the row and the text are selected.

3) Actual behavior

When I text-select a value in a table cell, and the mouse button is released (i.e. mouseup event) while the mouse pointer is still inside the cell, the row is row-selected, but the text is not selected anymore. If the pointer moves outside the cell (e.g. into the cell to the right of the one containing the value I’d like to text-select), then the row is not row-selected, but the cell’s content is text-selected.

4) Steps to reproduce

  1. Open https://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml, and scroll down to table “Single with Row Click”.
  2. In the first row (any other shows the same behavior) push the left mouse button down, hold it

5) Sample XHTML

See https://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml, Table “Single with Row Click”.

6) Sample bean

Not relevant.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, Sep 27, 2021

I reopened it

0reactions
j-becommented, Sep 27, 2021

The issue still persists, but it seems I can’t reopen? @melloware shall I enter a new one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

weird tableview behavior when cell is selected - Stack Overflow
The first suspect I would say is estimated height for row not being consistent with actual cell height. If you have static cell...
Read more >
Behavior with Data Table selected fill
I am getting strange behavior for all three tables at runtime. My chosen selected fill color will sometimes stop showing in the top...
Read more >
Handling row selection in a table view - Apple Developer
Configure row selection behavior​​ Use the following properties to configure how row selection behaves in a table view: allowsSelection. Determines whether users ...
Read more >
Get Data from a Selected row the cell — DataTables forums
Hello, i like the value from a cell in a selected row, but it doesn't work.
Read more >
HTML table basics - Learn web development | MDN
This article gets you started with HTML tables, covering the very basics such as rows, cells, headings, making cells span multiple columns ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found