-
Type:
New Feature
-
Resolution: Done
-
Priority:
Normal
-
Affects Version/s: 8.6.0
-
Component/s: None
-
Security Level: Jimmy
-
None
-
ZK 8.6.1 S1
-
None
Current Result
Current input based components such as bandbox, combobox, textbox, etc are relying on a DOM <input> element.
This DOM element attributes will be processed by different browsers.
While most browsers autocomplete only displays a thin red line below the words, safari autocorrect will automatically open a spell checking popup if the word is not recognised, which can affect UI presentation.
Expected Result
Developers should be able to toggle autocorrect="on/off" and spellcheck="true/false" depending on their intentions.
Debug Info
This is easy on textbox using xmlns:ca to just add a client-attribute to the dom, but it requires overrides for components using an <input> wrapped into a container node such as bandbox
Workaround
for bandbox specifically:
<script><![CDATA[ zk.afterLoad('zul.inp', function() { var xBandbox = {}; zk.override(zul.inp.Bandbox.prototype, xBandbox ,{ bind_ : function() { var result = xBandbox.bind_.apply(this, arguments); var inpNode = this.getInputNode(); inpNode.setAttribute("autocorrect","off"); inpNode.setAttribute("spellcheck",false); return result; } });//zk.override });//zk.afterLoad ]]></script>