abego/YourSearchPlugin — Issue #1: Error in macro <<search>> in IE8
Author: abego
Created: 2011-12-04 21:48:58+00:00
State: open

from: https://github.com/simonbaird/mGSD/issues/18#issuecomment-3000560

I duplicated this issue in IE8 and mGSD 3.1.9 beta. The error does not occur if the bundled 'YourSearchPlugin 2.1.3' plugin is disabled. The error is occuring because the plugin is attempting to set the 'type' of the search 'input' element to 'text'. Since the default 'type' for an 'input' element in IE8 is 'text', this is not necessary so the following code:
```txt.onkeyup=_163;txt.onfocus=_166;txt.setAttribute("size",_16a);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5");}else{txt.setAttribute("type","text");}
```
can be changed to:
```txt.onkeyup=_163;txt.onfocus=_166;txt.setAttribute("size",_16a);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5");}
```
See the 'Remarks' section of http://msdn.microsoft.com/en-us/library/ms534700(v=vs.85).aspx for details.
I will contact the owner of the YourSearchPlugin with this information.