Search bar drag & drop unbidden search Topic is solved

The place to report Pale Moon specific bugs on the Windows operating system.
Locked
zerogravity

Search bar drag & drop unbidden search

Post by zerogravity » 2017-07-26, 19:49

Steps to reproduce:
1. Select Text
2. Drag it to the search bar and drop it.

Expected behaviour:
The text is copied to the search bar.

Actual behaviour:
The text is copied to the search bar and is submitted despite me neither clicking search nor pressing enter.

It is logical to expect drag & drop to act as a shortcut for rightclick -> copy -> move -> rightclick -> paste, which is the case in FF.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Search bar drag & drop unbidden search

Post by Moonchild » 2017-07-27, 18:17

I'm sorry but the expected behavior for dropping an item is to perform the default action on it.
If you drop a URL onto a browser, you'd expect it to open it. If you drop text on a search box, you'd expect it to launch a search for that text. If you drop an image on the browser, you'd expect it to display it. If you want to just paste the text, then paste the text...? :)
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

zerogravity

Re: Search bar drag & drop unbidden search

Post by zerogravity » 2017-07-27, 19:50

Moonchild wrote:I'm sorry but the expected behavior for dropping an item is to perform the default action on it.
But then why is text that is dragged & dropped to the location/search bar copied but does not have the default action performed on it? I like it this way, but should it not at least be consistent?

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Search bar drag & drop unbidden search

Post by adesh » 2017-07-30, 07:11

zerogravity wrote:I like it this way, but should it not at least be consistent?
Maybe the location bar knows only to deal with URLs. It sees random text as an invalid adress that you may want to correct.
Anyway you can use this inconsistency to your advantage and perform search.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Search bar drag & drop unbidden search

Post by Moonchild » 2017-07-31, 02:58

The address bar is primarily just that: for addresses/URLs. If you drop text that is an invalid URL, it's ambiguous whether it is a misspelled URL or an intended search, and as a result no action is the "default action" (you can thank the people who thought combining address bar and search functionality in one field was a good idea for that one).
If you drag a valid URL to the address bar, the browser will immediately browse to it since that is the default action for the address bar if given something valid.

Conversely, the search bar is *always* used only for searching, so no matter what is dropped there, the default action will always be a search.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Locked