News:

Looking for documentation? Take a look on our wiki

Main Menu

3.2.14 - Text in Virtuemart Search Module doesn't clear

Started by Roderic, April 12, 2018, 16:55:55 PM

Previous topic - Next topic

Roderic

Since the 3.2.14 update, removing the "old JS" (Revision 9780), made it so that the "Search.." text doesn't remove "onfocus" and you'll have to manually remove it yourself.
I put back a previous version of /modules/mod_virtuemart_search/tmp/default.php and it works again as it should.

I can of course make an override in my template, but since this is a bug, I thought I better report it.

maxispin

Yes. The default text (or added) has to be cleared manually each time.

Workaround: Type one empty space in the default text .   " "   (without quotes)
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

stawebnice

Quick fix for this before it is solved is to add this language override with empty translation:

MOD_VIRTUEMART_SEARCH_TEXT_TXT

Go to Extensions - Languages - Overrides - select site language (s) and click NEW button to create a new language override - enter only MOD_VIRTUEMART_SEARCH_TEXT_TXT in language constant field and leave "text" empty, that  will do

then it does not display the text - only word search in your language and no one has to delete anything before typing in the search query


StefanSTS

Hi,

the old js was replaced by the HTML attribute placeholder.
The attribute might work differently in different browsers. Which browser are you using?

In Firefox, Chrome, Opera and Midori on Ubuntu Linux the behaviour is as expected.
- The placeholder is in the search field in light grey.
- On focus it does not disappear.
- On typing the first letter, the placeholder is replaced by the first typed letter.
- On removing the typed letter(s) the placeholder reappears.

Does anyone have different results? Please state with browser name and version.

Regards
Stefan

PS. The used variable in the code ist $button_text (default: MOD_VIRTUEMART_SEARCH_GO), that is indeed wrong, it should be $text (default: MOD_VIRTUEMART_SEARCH_TEXT_TXT). You can change these default values in the search module settings.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

StefanSTS

Just in case someone wants to change the behaviour and make the placeholder disappear on focus.

This CSS should do for most browsers:

input:focus:-moz-placeholder {color:transparent;}
input:focus::-moz-placeholder {color:transparent;}
input:focus::-webkit-input-placeholder {color:transparent;}
input:focus:-ms-input-placeholder {color:transparent;}

Hope it helps
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

sandomatyas

Quote from: StefanSTS on April 20, 2018, 08:01:50 AM
Hi,

the old js was replaced by the HTML attribute placeholder.
The attribute might work differently in different browsers. Which browser are you using?

In Firefox, Chrome, Opera and Midori on Ubuntu Linux the behaviour is as expected.
- The placeholder is in the search field in light grey.
- On focus it does not disappear.
- On typing the first letter, the placeholder is replaced by the first typed letter.
- On removing the typed letter(s) the placeholder reappears.

Does anyone have different results? Please state with browser name and version.

Regards
Stefan

PS. The used variable in the code ist $button_text (default: MOD_VIRTUEMART_SEARCH_GO), that is indeed wrong, it should be $text (default: MOD_VIRTUEMART_SEARCH_TEXT_TXT). You can change these default values in the search module settings.

Very annoying bug. Firefox 60.
But it's in the code.
I checked the code in VM 3.2.15.9877, but it's the same :/

p.barg

In my tests the placeholder doesn't disappear on typing the first letter...
Tried with FF  60.0.2, Chrome 67.0.3396.87

sandomatyas

Quote from: p.barg on June 18, 2018, 09:12:29 AM
In my tests the placeholder doesn't disappear on typing the first letter...
Tried with FF  60.0.2, Chrome 67.0.3396.87

Because this isn't the placeholder param, it's the default value param of the input

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/