Annoying Search Issue

All suggestions about TPFC should be posted here. Discussions about changes to TPFC will also be carried out here.
Message
Author
Joe
Posts: 46
Joined: Wed Apr 23, 2014 5:16 pm

Annoying Search Issue

#1 Post by Joe »

Why can't I paste directly into the Search box on the main site? If I copied a program name and want to search for it I have to left-click in the Search box then right-click or Ctrl + V to paste it. Why do I have to left-click in the Search box before I can paste something? I don't have to do this on other sites I have encountered. To me this unintuitive and a waste of an extra action.

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: Annoying Search Issue

#2 Post by tproli »

You mean the "Search" string doesn't disappear when you right-click? That's because the input field placeholder is handled by JavaScript and not a real html5 placeholder. When redesign took place html5 was not that common. I guess you have to wait until the next redesign :)

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Annoying Search Issue

#3 Post by SYSTEM »

Joe wrote:I don't have to do this on other sites I have encountered.
What do you mean? When you search on those other sites, do you just go to the site and press Ctrl-V? Can you give an example link?
My YouTube channel | Release date of my 13th playlist: August 24, 2020

Joe
Posts: 46
Joined: Wed Apr 23, 2014 5:16 pm

Re: Annoying Search Issue

#4 Post by Joe »

tproli wrote:You mean the "Search" string doesn't disappear when you right-click? That's because the input field placeholder is handled by JavaScript and not a real html5 placeholder. When redesign took place html5 was not that common. I guess you have to wait until the next redesign :)
Exactly! So... when will be the next redesign?
SYSTEM wrote:Can you give an example link?
Let's say I copy the text Firefox. If I go to Softpedia all I have to do is right-click in the Search box and select Paste. (Note, that worked on Softpedia even before they upgrade their website recently). Here on TPFC I have to left-click in the Search box then right-click and select Paste. It's so cumbersome and unintuitive.

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Annoying Search Issue

#5 Post by SYSTEM »

Joe wrote:
SYSTEM wrote:Can you give an example link?
Let's say I copy the text Firefox. If I go to Softpedia all I have to do is right-click in the Search box and select Paste. (Note, that worked on Softpedia even before they upgrade their website recently). Here on TPFC I have to left-click in the Search box then right-click and select Paste. It's so cumbersome and unintuitive.
Ah, I see.

Tproli is right. The cause is the way the placeholder in the search box is implemented. I have no idea when it will be changed.

By the way, now when we're talking about minor website issues, it would be nice to disable autocomplete in the "Size" field in the editing page. Often the sizes of programs start with the same numbers, but are not same in the end. Thus, the autocomplete box pops up but I can't use it.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Annoying Search Issue

#6 Post by Andrew Lee »

@tproli: What if we remove the "Search..." text altogether? That would solve the problem, right? I think the magnifying-glass icon should be clear enough to signify it's a search field.

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Annoying Search Issue

#7 Post by Andrew Lee »

@SYSTEM: I added the 'autocomplete="off"' attribute to the size field. Let me know if it works for you.

Joe
Posts: 46
Joined: Wed Apr 23, 2014 5:16 pm

Re: Annoying Search Issue

#8 Post by Joe »

Andrew Lee wrote:@tproli: What if we remove the "Search..." text altogether? That would solve the problem, right? I think the magnifying-glass icon should be clear enough to signify it's a search field.
...or you could put the "Search" text outside the box. If you leave it out completely then the box may be mistaken for "Detailed search" simply because the latter is positioned so close to the box.

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Annoying Search Issue

#9 Post by SYSTEM »

Andrew Lee wrote:@SYSTEM: I added the 'autocomplete="off"' attribute to the size field. Let me know if it works for you.
It works fine. Thanks. :)
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: Annoying Search Issue

#10 Post by tproli »

Andrew Lee wrote:@tproli: What if we remove the "Search..." text altogether? That would solve the problem, right? I think the magnifying-glass icon should be clear enough to signify it's a search field.
Yes, but with the side-effect that Joe mentioned.

Try replacing "searchInput.click" with "searchInput.focus" in functions.js - that fixes the issue in Chrome, Firefox, IE10.

Actually adding a placeholder tag instead would also fix this even though the doctype isn't html5.
Then lines from 93 to 126 could be removed from functions.js.

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Annoying Search Issue

#11 Post by Andrew Lee »

Try replacing "searchInput.click" with "searchInput.focus" in functions.js - that fixes the issue in Chrome, Firefox, IE10.
Just did it and verified that it works. Thanks!

Joe
Posts: 46
Joined: Wed Apr 23, 2014 5:16 pm

Re: Annoying Search Issue

#12 Post by Joe »

Thanks for fixing this!

User avatar
JohnTHaller
Posts: 716
Joined: Wed Feb 10, 2010 4:44 pm
Location: New York, NY
Contact:

Re: Annoying Search Issue

#13 Post by JohnTHaller »

You can make the it a bit more lightweight by removing the javascript function for the searchbox altogether and adding:

placeholder="Search..."

to the actual INPUT tag. You'd wind up with this:

Code: Select all

<input type="text" name="q" id="q" value="" placeholder="Search..." />
It works in Firefox, Opera, Safari, Chrome and IE10+.
PortableApps.com - The open standard for portable software | Support Net Neutrality

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: Annoying Search Issue

#14 Post by tproli »

But fails in IE9 and earlier. That's why the placeholder attribute was rejected. Currently TPFC is not even html5 (though the placeholder still works in modern browsers even so, as I wrote two days ago).

User avatar
JohnTHaller
Posts: 716
Joined: Wed Feb 10, 2010 4:44 pm
Location: New York, NY
Contact:

Re: Annoying Search Issue

#15 Post by JohnTHaller »

True, but it won't break the page. The placeholder will just not be shown. The search icon is likely sufficient for that small subset of users. Of course, I don't know what percentage of PFC visitors are using IE9 or lower, so your mileage may vary. We wound up removing the label and using a PLACEHOLDER on PortableApps.com. We also use the TITLE field with "Enter the terms you wish to search for" set. This shows up as a tooltip in earlier browsers like IE7, 8, and 9 as you mouseover or focus the box which can help to offset any confusion about what the field is.
PortableApps.com - The open standard for portable software | Support Net Neutrality

Post Reply