Domanda

La pagina Contattaci nel tema RWD ha la casella "Nome" come elemento attivo quando atterra sulla pagina in modo che il cursore sia in questa casella e viene evidenziato.Questa è una seccatura su un dispositivo mobile perché sei colpito con una tastiera in faccia ogni volta che vai in questa pagina.Come posso disabilitare la casella "Nome" è attiva?

È stato utile?

Soluzione

Cambia sotto il codice:

<script type="text/javascript">
//<![CDATA[
    var contactForm = new VarienForm('contactForm', true);
//]]>
</script>
.

A:

<script type="text/javascript">
//<![CDATA[
    var contactForm = new VarienForm('contactForm', false);
//]]>
</script>
.

Controlla questo file JS / Varien / Form.js

initialize: function(formId, firstFieldFocus){
        this.form       = $(formId);
        if (!this.form) {
            return;
        }
        this.cache      = $A();
        this.currLoader = false;
        this.currDataIndex = false;
        this.validator  = new Validation(this.form);
        this.elementFocus   = this.elementOnFocus.bindAsEventListener(this);
        this.elementBlur    = this.elementOnBlur.bindAsEventListener(this);
        this.childLoader    = this.onChangeChildLoad.bindAsEventListener(this);
        this.highlightClass = 'highlight';
        this.extraChildParams = '';
        this.firstFieldFocus= firstFieldFocus || false;
        this.bindElements();
        if(this.firstFieldFocus){
            try{
                Form.Element.focus(Form.findFirstElement(this.form))
            }
            catch(e){}
        }
    }
.

Se si imposta FirstFieldFocus su FALSE non attiverà la messa a fuoco sul primo campo.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top