Author Topic: 3.2.14 - Text in Virtuemart Search Module doesn't clear  (Read 1329 times)

Roderic

  • Beginner
  • *
  • Posts: 17
3.2.14 - Text in Virtuemart Search Module doesn't clear
« on: April 12, 2018, 16:55:55 pm »
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

  • Jr. Member
  • **
  • Posts: 174
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #1 on: April 15, 2018, 18:21:09 pm »
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

  • Jr. Member
  • **
  • Posts: 232
  • What does not kill you, makes you stronger...
    • StaWEBnice - www stránky, seo optimalizace a copywriting
  • Skype Name: peta_ze_sklepa
  • VirtueMart Version: 3.2.14
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #2 on: April 19, 2018, 13:49:28 pm »
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

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 223
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #3 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.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

StefanSTS

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 223
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #4 on: April 25, 2018, 11:29:22 am »
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

sandomatyas

  • Jr. Member
  • **
  • Posts: 239
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #5 on: June 18, 2018, 08:59:32 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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 154
    • Barg IT
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #6 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

sandomatyas

  • Jr. Member
  • **
  • Posts: 239
Re: 3.2.14 - Text in Virtuemart Search Module doesn't clear
« Reply #7 on: June 18, 2018, 17:10:00 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9743
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/