Bug 1764990 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm not really sure what the issue is, but if you look at source code on Searchfox or diffs on Phabricator, there's an issue when double clicking to select text and then dragging across multiple lines/rows. I'll attach a recording to show what it looks like. Basically the line/row you first clicked gets completely and permanently selected when you move the cursor to another line and then back. This also happens if you extend the selection with shift + arrow keys too. And if you copy and paste the selection, there's a spurious _newline_ character in the selection!

What they have in common, I guess, is row-like elements. I can't say much more than that since they're divs with `display: flex` on Searchfox, and table rows on Phabricator. As I'm typing this (here on Bugzilla), the "Possible Duplicates" display that shows up under the Summary field is a table with similar rows. And if I repeat this in that table, I get the same results. The characters trailing my selection in the row I double clicked get permanently selected after I drag the cursor down to the next row and then back up to the first row. If I drag the cursor up to the previous row, then the characters leading the selection get permanently selected.

### STR
1. Click [this link](https://searchfox.org/mozilla-central/source/dom/html/TextControlState.cpp)
2. On line 7, double click (and hold) on any of the characters in `#include`
 Your selection should look like `include`
3. With the left mouse button held down, move your cursor down to line 8.
4. Your selection should look like this now:
```
include "TextControlState.h"
#include
```
5. Now, still holding down the LMB, move your cursor back up to line 7.
6. Your selection should look like this now:
```
include "TextControlState.h"
```
7. Copy your selection by hitting Accel+C
8. Paste it in a text editor
9. Your pasted text should say:
```
include
 "TextControlState.h"
```

### Expected
6. This selection should instead return to just `include`
9. The pasted text of course should be the same, just `include`. But that aside, there also shouldn't be a newline character in the pasted text, since there certainly isn't one in the copied text.
I'm not really sure what the issue is, but if you look at source code on Searchfox or diffs on Phabricator, there's an issue when double clicking to select text and then dragging across multiple lines/rows. I'll attach a recording to show what it looks like. Basically the line/row you first clicked gets completely and permanently selected when you move the cursor to another line and then back. This also happens if you extend the selection with shift + arrow keys too. And if you copy and paste the selection, there's a spurious _newline_ character in the selection!

What they have in common, I guess, is row-like elements. I can't say much more than that since they're divs with `display: flex` on Searchfox, and table rows on Phabricator. As I'm typing this (here on Bugzilla), the "Possible Duplicates" display that shows up under the Summary field is a table with similar rows. And if I repeat this in that table, I get the same results. The characters trailing my selection in the row I double clicked get permanently selected after I drag the cursor down to the next row and then back up to the first row. If I drag the cursor up to the previous row, then the characters leading the selection get permanently selected.

### STR
1. Click [this link](https://searchfox.org/mozilla-central/source/dom/html/TextControlState.cpp)
2. On line 7, double click (and hold) on any of the characters in `#include`
 Your selection should look like `include`
3. With the left mouse button held down, move your cursor down to line 8.
4. Your selection should look like this now:
```
include "TextControlState.h"
#include
```
5. Now, still holding down the LMB, move your cursor back up to line 7, where it was previously — on the characters in `#include`
6. Your selection should look like this now:
```
include "TextControlState.h"
```
7. Copy your selection by hitting Accel+C
8. Paste it in a text editor
9. Your pasted text should say:
```
include
 "TextControlState.h"
```

### Expected
6. This selection should instead return to just `include`
9. The pasted text of course should be the same, just `include`. But that aside, there also shouldn't be a newline character in the pasted text, since there certainly isn't one in the copied text.
I'm not really sure what the issue is, but if you look at source code on Searchfox or diffs on Phabricator, there's an issue when double clicking to select text and then dragging across multiple lines/rows. I'll attach a recording to show what it looks like. Basically the line/row you first clicked gets completely and permanently selected when you move the cursor to another line and then back. This also happens if you extend the selection with shift + arrow keys too. And if you copy and paste the selection, there's a spurious _newline_ character in the selection!

What they have in common, I guess, is row-like elements. I can't say much more than that since they're divs with `display: flex` on Searchfox, and table rows on Phabricator. As I'm typing this (here on Bugzilla), the "Possible Duplicates" display that shows up under the Summary field is a table with similar rows. And if I repeat this in that table, I get the same results. The characters trailing my selection in the row I double clicked get permanently selected after I drag the cursor down to the next row and then back up to the first row. If I drag the cursor up to the previous row, then the characters leading the selection get permanently selected.

### STR
1. Click [this link](https://searchfox.org/mozilla-central/source/dom/html/TextControlState.cpp)
2. On line 7, double click (and hold) on any of the characters in `#include`
 Your selection should look like `include`
3. With the left mouse button held down, move your cursor down to line 8, without changing its horizontal position
4. Your selection should look like this now:
```
include "TextControlState.h"
#include
```
5. Now, still holding down the LMB, move your cursor back up to line 7, where it was previously — on the characters in `#include`
6. Your selection should look like this now:
```
include "TextControlState.h"
```
7. Copy your selection by hitting Accel+C
8. Paste it in a text editor
9. Your pasted text should say:
```
include
 "TextControlState.h"
```

### Expected
6. This selection should instead return to just `include`
9. The pasted text of course should be the same, just `include`. But that aside, there also shouldn't be a newline character in the pasted text, since there certainly isn't one in the copied text.
I'm not really sure what the issue is, but if you look at source code on Searchfox or diffs on Phabricator, there's an issue when double clicking to select text and then dragging across multiple lines/rows. I'll attach a recording to show what it looks like. Basically the line/row you first clicked gets completely and permanently selected when you move the cursor to another line and then back. This also happens if you extend the selection with shift + arrow keys too. And if you copy and paste the selection, there's a spurious _newline_ character in the selection!

What they have in common, I guess, is row-like elements. I can't say much more than that since they're divs with `display: flex` on Searchfox, and table rows on Phabricator. As I'm typing this (here on Bugzilla), the "Possible Duplicates" display that shows up under the Summary field is a table with similar rows. And if I repeat this in that table, I get the same results. The characters trailing my selection in the row I double clicked get permanently selected after I drag the cursor down to the next row and then back up to the first row. If I drag the cursor up to the previous row, then the characters leading the selection get permanently selected.

### STR
1. Click [this link](https://searchfox.org/mozilla-central/source/dom/html/TextControlState.cpp)
2. On line 7, double click (and hold) on any of the characters in `#include`
 Your selection should look like `include`
3. With the left mouse button held down, move your cursor down to line 8, without changing its horizontal position
4. Your selection should look like this now:
```
include "TextControlState.h"
#include
```
5. Now, still holding down the LMB, move your cursor back up to line 7, where it was previously — on the characters in `#include`
6. Your selection should look like this now:
```
include "TextControlState.h"
```
7. Copy your selection by hitting Accel+C
8. Paste it in a text editor
9. Your pasted text should say:
```
include
 "TextControlState.h"
```

### Expected
6. This selection should instead return to just `include`
9. The pasted text of course should be the same, just `include`. But that aside, there also shouldn't be a newline character in the pasted text, since there certainly isn't one in the copied text.

By the way, I gave Searchfox as an example, but I repeated the full steps on Phabricator and Bugzilla too. Oddly, the copy+paste issue also occurs on Bugzilla, but I didn't see it on Phabricator, even though the selection issue that seems to be connected to the copy+paste issue _does_ occur on Phabricator.
I'm not really sure what the issue is, but if you look at source code on Searchfox or diffs on Phabricator, there's an issue when double clicking to select text and then dragging across multiple lines/rows. I'll attach a recording to show what it looks like. Basically the line/row you first clicked gets completely and permanently selected when you move the cursor to another line and then back. This also happens if you extend the selection with shift + arrow keys too. And if you copy and paste the selection, there's a spurious _newline_ character in the selection!

What they have in common, I guess, is row-like elements. I can't say much more than that since they're divs with `display: flex` on Searchfox, and table rows on Phabricator. As I'm typing this (here on Bugzilla), the "Possible Duplicates" display that shows up under the Summary field is a table with similar rows. And if I repeat this in that table, I get the same results. The characters trailing my selection in the row I double clicked get permanently selected after I drag the cursor down to the next row and then back up to the first row. If I drag the cursor up to the previous row, then the characters leading the selection get permanently selected.

### STR
1. Click [this link](https://searchfox.org/mozilla-central/source/dom/html/TextControlState.cpp)
2. On line 7, double click (and hold) on any of the characters in `#include`
 Your selection should look like `include`
3. With the left mouse button held down, move your cursor down to line 8, without changing its horizontal position
4. Your selection should look like this now:
```
include "TextControlState.h"
#include
```
5. Now, still holding down the LMB, move your cursor back up to line 7, where it was previously — on the characters in `#include`
6. Your selection should look like this now:
```
include "TextControlState.h"
```
7. Copy your selection by hitting Accel+C
8. Paste it in a text editor
9. Your pasted text should say:
```
include
 "TextControlState.h"
```

### Expected
6. This selection should instead return to just `include`
9. The pasted text of course should be the same, just `include`. But that aside, there also shouldn't be a newline character in the pasted text, since there certainly isn't one in the copied text.

By the way, I gave Searchfox as an example, but I repeated the full steps on Phabricator and Bugzilla too. Oddly, the copy+paste issue also occurs on Bugzilla, but I didn't see it on Phabricator, even though the selection issue that seems to be connected to the copy+paste issue _does_ occur on Phabricator.

The newline character always seems to get inserted directly after the original double-click selection. So, in the example I gave, it comes after `include` because that's the string we first selected by double-clicking. Here on Bugzilla, you can double click the `firefox101` string in the Tracking Flags section above, and drag down and back up, and then copy paste. And you'll get this:
```
firefox101
	--- 	affected

```

Back to Bug 1764990 Comment 0