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.
Yes. The default text (or added) has to be cleared manually each time.
Workaround: Type one empty space in the default text . " " (without quotes)
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
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.
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
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 :/
In my tests the placeholder doesn't disappear on typing the first letter...
Tried with FF 60.0.2, Chrome 67.0.3396.87
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
New version is in the trunk http://dev.virtuemart.net/projects/virtuemart/repository/changes/trunk/virtuemart/modules/mod_virtuemart_search/mod_virtuemart_search.php