Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middle button copy/paste behavior is incompatible with URL field contents being restored after switching focus away #291

Open
snan opened this issue Jun 7, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@snan
Copy link

snan commented Jun 7, 2021

Me, just now, deleting an url so I can go select something so I can middle-button-primary-paste it in there, and then switching back to lagrange only to find it's been restored. This happened a couple of times until I ound out what was going on.

@ghost
Copy link

ghost commented Jun 8, 2021

For me, this only happens when I've deleted the text in the addressbar before the current page has finished loading.

@snan
Copy link
Author

snan commented Jun 8, 2021

It happens as soon as I shift to another window (which I do in order to select something to paste in).

@ghost
Copy link

ghost commented Jun 8, 2021

Ah, ok, I didn't notice that. Yes, it does. So there's two cases it happens in:

  • Deleting url and then the window looses focus.
  • Deleting url before current page has finished loading.

@skyjake skyjake added the enhancement New feature or request label Jun 8, 2021
@skyjake
Copy link
Owner

skyjake commented Jun 8, 2021

@snan I assume you're on X11? The copy/paste behavior in Lagrange does not conform to the X11 convention of having several different clipboards, one for marked text and one for explicitly copied text. Instead, it only has the latter, which means all platforms behave the same way. (Issue #162) Therefore, deleting the URL prior to doing the middle-button-paste is not needed. It is possible to first make the copy elsewhere and then focus the URL field (left click), and middle-button-paste the URL.

The URL input field in Lagrange is prevented from being empty while the field is unfocused. If you clear it, and then remove focus from the field (with Tab, clicking elsewhere, or by switching to a different app) the current page's URL will be automatically restored.

Let me know if I've misunderstood the use case. I can appreciate this being a negative experience if one expects traditional X11 behavior. This should be addressed at least on X11, and especially after #162 is done.

@krixano That is a related but not exactly the same situation. When a request finishes, the fetched URL is set to the one that was fetched so there no possibility of confusing which URL's content is being shown. An appropriate fix there might be to disable the URL input field while a fetch is ongoing, although then you'd have to manually stop the request before editing the URL via the keyboard, which seems cumbersome.

I'll think about decoupling the URL field a bit more from the current page's URL, but as mentioned they are tightly linked currently to avoid mix-ups.

@skyjake skyjake changed the title Too quickly restores url after deleting url Middle button copy/paste behavior is incompatible with URL field contents being restored after switching focus away Jun 8, 2021
@ghost
Copy link

ghost commented Jun 8, 2021

That is a related but not exactly the same situation.

Yep, I know it's different :) I just wanted to make sure it was mentioned somewhere here on github so you know about it.

@snan
Copy link
Author

snan commented Jun 8, 2021

I can appreciate this being a negative experience if one expects traditional X11 behavior.

Thank you, yes. You've understood the issue correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants