Autocompletion disrupts selection

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
mskala

Autocompletion disrupts selection

Unread post by mskala » 2017-03-13, 14:56

A common use case for me: I highlight some text I want to translate in a Web page. I click the "plus" tab to create a new tab, keyboard focus is automatically on the location bar, I type "tr" (which is the start of "translate.google.com") and the browser fills in the rest of the URL. I hit enter, and middle-click in the translation input box.

What should happen, and did until I upgraded from 25.2.1 to 27.1.2 a few days ago: the text I highlighted is pasted into the box.

What happens in 27.1.2 instead: the text that had been supplied by autocompletion (that is, "anslate.google.com/") is pasted.

I am using Google Translate as the example because it's an easy-to-demonstrate case, but the problem is not specific to Google Translate; every use of location-bar autocompletion disrupts the selection.

Years ago, before I started using Pale Moon, I experienced a similar problem with Twitter and Firefox, and I was able to solve it by setting dom.event.clipboardevents.enabled to false. At that time the problem was specific to Twitter, and it seemed to be caused by Twitter's JavaScript tampering with the state of the selection. The config setting prevented the JavaScript from seeing the notifications involved in doing that. When I switched to Pale Moon I ported all my config settings, and I didn't experience this type of problem with Pale Moon until the recent upgrade. Post-upgrade, the only way I can find to prevent autocompletion from disrupting the selection is to disable autocompletion.

Is there a setting to return Pale Moon 27's autocompletion behaviour to that of Pale Moon 25?

Andrew Gilbertson

Re: Autocompletion disrupts selection

Unread post by Andrew Gilbertson » 2017-03-13, 17:12

Sounds like your DE is set to paste from the selection buffer rather than the clipboard on middle-click. Did you change DEs, or your DE's settings, from the last time you're aware of this working?

Also: I get the same behavior on middle-click, but not on pressing Ctrl-V or Shift-Insert. (Or right-click, Paste if you don't want to use the keyboard. But keyboard shortcuts are so much faster.)

mskala

Re: Autocompletion disrupts selection

Unread post by mskala » 2017-03-13, 17:35

What is a "DE"?

User avatar
eskaton
Lunatic
Lunatic
Posts: 474
Joined: 2013-08-23, 19:54

Re: Autocompletion disrupts selection

Unread post by eskaton » 2017-03-13, 18:39


mskala

Re: Autocompletion disrupts selection

Unread post by mskala » 2017-03-13, 18:53

Thanks. No, I haven't changed my desktop environment (XFCE, under Slackware Linux) nor its settings. The issue shows up specifically in the upgrade from Pale Moon 25 to Pale Moon 27, with nothing else changing in between.

Also, I want to be clear that the fact the selection is being pasted is not the problem - that's the desired behaviour, and both versions of Pale Moon do it. (It is also consistent with other software.) The problem is that Pale Moon 27 changes the selection when it does autocompletion in the location bar, in a way that Pale Moon 25 did not.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35640
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Autocompletion disrupts selection

Unread post by Moonchild » 2017-03-13, 19:52

This is a known issue and has been addressed in our development. Issue #852
This will be corrected in 27.2
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

mskala

Re: Autocompletion disrupts selection

Unread post by mskala » 2017-03-14, 00:36

Oh, good!      

dinosaur
Fanatic
Fanatic
Posts: 165
Joined: 2014-06-03, 09:26
Location: France

Re: Autocompletion disrupts selection

Unread post by dinosaur » 2017-03-14, 10:02

Months ago, I advocated against making Linux PM's default behaviour for input fields auto-selection the same as under Windows, but my plea was dismissed...

I'm glad that the recent survey showed that Linuxers represent a very large proportion of PM's users (this does not come as a surprise to me: Linux users are "rebels" against imposed lesser software solutions, just like PM users are), and that Moonchild acknowledged that fact ("At any rate, it will mean that we will most definitely provide ample focus on Linux-specific improvements going forward.").

I don't know what's in the pipeline for 27.2, but I do hope the default behaviour for selection will be reverted, for Linux, to what it originally was in PM (and always has been in Firefox and all Linux software): Linux/UNIX got superior selection features (actually providing its users with *two* copy/paste buffers) and I don't see why a Linux software should ruin it by default (if Linux/UNIX newbies are surprised by this behaviour, then they simply have to be educated and shown why it is superior to the Windows' way, and be let an option to disable it if they still don't to accept it).

In the mean time, here are a couple of patches I'm using for my personal builds of PM: the first patch reverts the default selection setting to what it was in the past, and the second adds a "wipe field" icon to the search and find input fields (since if you proceed like under Windows to clear them, selecting and pressing the DEL key, you loose the primary selection under Linux).

Enjoy ! :D
You do not have the required permissions to view the files attached to this post.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35640
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Autocompletion disrupts selection

Unread post by Moonchild » 2017-03-14, 13:19

dinosaur: if you don't like the behavior, flip the pref. It was changed in the past because the majority of our users wanted unified behavior on Windows and Linux.

This has also nothing to do with this bug report, kindly don't hijack forum threads.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

dinosaur
Fanatic
Fanatic
Posts: 165
Joined: 2014-06-03, 09:26
Location: France

Re: Autocompletion disrupts selection

Unread post by dinosaur » 2017-03-14, 15:04

Moonchild wrote:dinosaur: if you don't like the behavior, flip the pref. It was changed in the past because the majority of our users wanted unified behavior on Windows and Linux.
Or were they the most vocal users ?
Any poll result to backup the "majority" claim ? :?:
With all due respect, I do not understand this stance about trying to make Linux behave like Windows... Linux is (thankfully) not Windows, and vice versa...
This has also nothing to do with this bug report, kindly don't hijack forum threads.
Sorry, it was not in my intention to "hijack" anything and, in my understanding, the bug was related to the primary selection buffer behaviour (especially since, when following the link to Issue #852, I saw Wolfbeast mentioning these very "select all on click" settings); but I could since reproduce the problem in v27 even with the settings "flipped the right way", so yes, it's indeed not (entirely) related (still, if the auto-complete code was not auto-selecting the completion text, this won't happen)... My bad. :oops: