Global event focus and blur ENYO

Lanza evento blur de forma global en todos los navegadores en objetos contentEditable

by EDWIN MAURICIO QUISHPE MALDONADO

JavaScript

enyo.kind({
    name:"App",
    kind:"Control",
    components:[
        {kind:"onyx.Input", attributes:{"onfocus":enyo.bubbler, "onblur":enyo.bubbler}},
        {tag:"p",
         content:"hola",
         attributes:{"onfocus":enyo.bubbler, "onblur":enyo.bubbler},
         /*attributes:{"onfocus":enyo.dispatcher.listen(document, "onfocus"), "onblur":enyo.bubbler},
         handlers:{
              onfocus:"focused",
              onblur:"blurred"
        },*/
         ondoubletap: "doubleTap",
         name:"contenido",
         doubleTapEnabled: true
        }
    ],
   create: function(){
        this.inherited(arguments);
   },
    handlers:{
        onfocus:"focused",
        onblur:"blurred"
    },
    focused:function(inSender, inEvent) {
        enyo.log("focused");
    },
    blurred:function(inSender, inEvent) {
        console.log(inSender);
        enyo.log("blurred");
    },
    doubleTap: function(inSender, inevent){
        inSender.setAttribute("contentEditable","true");
    }
});

new App().renderInto(document.body)