fix loader. element focused property.

This commit is contained in:
Christopher Jeffrey 2014-06-10 21:41:22 -05:00
parent d065230e70
commit 5b249d3fec
2 changed files with 6 additions and 1 deletions

View File

@ -284,6 +284,7 @@ The base element.
- **content** - element's text content.
- **clickable** - element is clickable.
- **input** - element is focusable and can receive key input.
- **focused** - element is focused.
- **hidden** - whether the element is hidden.
- **label** - a simple text label for the element.
- **align** - text alignment: `left`, `center`, or `right`.

View File

@ -1880,6 +1880,10 @@ Element.prototype.__proto__ = Node.prototype;
Element.prototype.type = 'element';
Element.prototype.__defineGetter__('focused', function() {
return this.screen.focused === this;
});
Element.prototype.sattr = function(obj, fg, bg) {
var bold = obj.bold
, underline = obj.underline
@ -5914,7 +5918,7 @@ Loading.prototype.load = function(text) {
this.setContent(text);
if (this._.timer) {
this._.stop();
this.stop();
}
this.screen.lockKeys = true;