rwd 연락처 활성 요소
-
29-09-2020 - |
문제
rwd 테마의 연락처 페이지에는 페이지에 착륙 할 때 "이름"상자가 있으므로 커서 가이 상자에 있고 강조 표시됩니다.이것은이 페이지에 갈 때마다 키보드로 키보드로 치기 때문에 모바일 장치의 불쾌감입니다.활성화되는 "이름"상자를 사용 중지하려면 어떻게합니까?
해결책
코드 아래 변경 :
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', true);
//]]>
</script>
.
to :
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', false);
//]]>
</script>
.
이 파일을 확인하십시오 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){}
}
}
.
FirstFieldFocus를 false로 설정하면 첫 번째 필드에 초점을 맞추지 않습니다.
제휴하지 않습니다 magento.stackexchange