Author Topic: Weird Selection of Text in Chrome  (Read 2198 times)

Syreta

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 19
    • View Profile
Weird Selection of Text in Chrome
« on: June 25, 2018, 11:43:19 am »
Hello,

I want to be able to select the text from the Grid (for copy & paste to another places or documents). It looks like that this is only possible when Grid Data is set to be editable, but I don't want to activate this option. Grid Data should be read only but text selection should be possible anyway!

In the pqgrid.dev.js I found line 1737 where the disableSelection function is called. When I comment this out, text selection is now possible!
My problem is, when I double-click a single word in the text, the text selection is completely confused in Google Chrome (please see my screenshot attached)! In FireFox and IE it works like expected.

Do you have any idea why the selection by double-click is weird in Chrome?

Thanks in advance,
Syreta

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Weird Selection of Text in Chrome
« Reply #1 on: June 25, 2018, 12:11:19 pm »
Grid has its own way and api ( which is enabled by default ) for copy paste operations.

Example: https://paramquery.com/pro/demos/copy_paste

multiple cells can be selected and copied with Ctrl C for copying cell content.

Syreta

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Weird Selection of Text in Chrome
« Reply #2 on: June 25, 2018, 12:24:31 pm »
Thanks for your answer.
I'm not sure if this is the reason for my problem because it occurs with non editable Grids. I don't want to have it editable! And in this case It looks like nothing happens with the cell on double-click (like in your example)!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Weird Selection of Text in Chrome
« Reply #3 on: June 25, 2018, 12:38:13 pm »
Cell(s) selection in grid works the same in editable and non-editable grids.

Whole cell is selected just by mouse down gesture on a cell.

Double click is not required to select a cell.

Multiple cells are selected by dragging the mouse while keeping the mouse button down.

Selection is light in color, may that is the cause of your confusion.
« Last Edit: June 25, 2018, 12:46:04 pm by paramquery »