this._fileUpload.change($.proxy(this._upload, this));
var $button = $('<p class="button uploadButton"><span>' + WCF.Language.get('wcf.global.button.upload') + '</span></p>');
elAttr($button[0], 'role', 'button');
- elAttr($button[0], 'tabindex', '0');
$button.prepend(this._fileUpload);
+
+ this._fileUpload[0].addEventListener('focus', function() { $button[0].classList.add('active'); });
+ this._fileUpload[0].addEventListener('blur', function() { $button[0].classList.remove('active'); });
}
else {
var $button = $('<p class="button uploadFallbackButton"><span>' + WCF.Language.get('wcf.global.button.upload') + '</span></p>');
this._button = elCreate('p');
this._button.className = 'button uploadButton';
elAttr(this._button, 'role', 'button');
- elAttr(this._button, 'tabindex', '0');
+
+ this._fileUpload.addEventListener('focus', (function() { this._button.classList.add('active'); }).bind(this));
+ this._fileUpload.addEventListener('blur', (function() { this._button.classList.remove('active'); }).bind(this));
var span = elCreate('span');
span.textContent = Language.get('wcf.global.button.upload');