title: How to Change TextBox (dijit/form/TextBox) Focus color
body: <p>I tried to create TextBoxEx which extends dijit/form/TextBox . TextBoxEx override _onFocus (see code below) but TextBox doesn't change background color. It always be tranparent. What's my fault?</p>
  
  <pre><code>define([
      "dojo/_base/declare", // declare
      "dijit/form/TextBox",
      "dojo/on",
      "dojo/_base/event",
      "dojo/dom-style"
  ], function(declare, TextBox, on, event, domStyle) {
  
      var widget = declare("common.TextBoxEx", [TextBox], {
  
          inputLanguage : '',
          focusColor : '#F5EC9B',
          selectOnClick : true,
          _onFocus: function(e){
              try{
                  if(this.disabled || this.readOnly){ return; }
                  this.inherited(arguments);
                  this._updatePlaceHolder();
                  var evt = document.createEvent("Events");
                  if(this.inputLanguage == 'en'){
                      evt.initEvent   ('switchToEng', true, false);
                      window.dispatchEvent(evt);
                  }
                  else if(this.inputLanguage == 'th'){
                      evt.initEvent('switchToThai', true, false);
                      window.dispatchEvent(evt);
                  }
  
                  var dom = this.focusNode;
                  var focusColor = this.focusColor;
  
                  setTimeout(function() {
                      dom.select();
                      domStyle.set(dom, 'background-color', focusColor);
  
                  }, 200);
              }
              catch(e){
                  console.log(e)
              }
          },
  
      });
  
      return widget;
  });
  </code></pre>