Index: third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js |
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js |
index 6888d63cbc40d45e7b1751915990adf899ef0a9d..aabfb7c2278a17d13dc78d3d7e21801cc4304400 100644 |
--- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js |
+++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js |
@@ -16,13 +16,14 @@ goog.provide('i18n.input.chrome.inputview.elements.content.CandidateButton'); |
goog.require('goog.dom.TagName'); |
goog.require('goog.dom.classlist'); |
goog.require('goog.style'); |
+goog.require('i18n.input.chrome.ElementType'); |
goog.require('i18n.input.chrome.inputview.Css'); |
goog.require('i18n.input.chrome.inputview.elements.Element'); |
goog.scope(function() { |
-var ElementType = i18n.input.chrome.inputview.elements.ElementType; |
+var ElementType = i18n.input.chrome.ElementType; |
var Css = i18n.input.chrome.inputview.Css; |
@@ -95,6 +96,7 @@ CandidateButton.prototype.createDom = function() { |
/** |
* Creates a separator. |
* |
+ * @return {!Element} The table cell element. |
* @private |
*/ |
CandidateButton.prototype.createSeparator_ = function() { |
@@ -126,8 +128,10 @@ CandidateButton.prototype.setVisible = function(visible) { |
var ret = CandidateButton.base(this, 'setVisible', visible); |
if (this.type == ElementType.VOICE_BTN) { |
var elem = this.getElement(); |
- elem.style.webkitAnimation = (visible ? 'visible' : 'invisible') + |
- '-animation .4s ease'; |
+ if (!elem) { |
+ elem.style.webkitAnimation = (visible ? 'visible' : 'invisible') + |
+ '-animation .4s ease'; |
+ } |
} |
return ret; |
}; |