bonaparte-panel
Advanced tools
Comparing version 0.0.23 to 0.0.24
{ | ||
"name": "bonaparte-panel", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "Bonaparte Component", | ||
@@ -15,3 +15,3 @@ "homepage": "http://bonaparte.io", | ||
"dependencies": { | ||
"bonaparte-core": "^0.0.23", | ||
"bonaparte-core": "^0.0.24", | ||
"mousetrap": "^1.5.3" | ||
@@ -18,0 +18,0 @@ }, |
@@ -36,7 +36,7 @@ var bp = require("bonaparte-core"); | ||
function clickHandler(e){ | ||
// console.log("globalClick", e.target); | ||
if(e.target === tag || bp.tag.contains(tag, e.target)) return; | ||
closePanels(); | ||
setTimeout(closePanels, 0); // Wait a tick for other click events to be executed in IE. | ||
} | ||
/////////////////////////////////////////////////////////////////////////////// | ||
@@ -46,9 +46,4 @@ | ||
if(bp.attribute.matchName(/open/, data.detail.name)){ | ||
if(data.detail.newValue == "true") { | ||
lock(); | ||
tag.bonaparte.triggerEvent("bonaparte.internal.closePanels", null, true); | ||
tag.bonaparte.triggerEvent("bonaparte.panel.open", null, true); | ||
} | ||
}; | ||
if(data.detail.newValue === "true") lock(); | ||
} | ||
} | ||
@@ -59,6 +54,11 @@ /////////////////////////////////////////////////////////////////////////////// | ||
if(bp.attribute.matchName(/open/, data.detail.name)){ | ||
if(data.detail.newValue != "true") { | ||
if(data.detail.newValue !== "true") { | ||
tag.bonaparte.triggerEvent("bonaparte.panel.close", null, true); | ||
} | ||
}; | ||
else { | ||
lock(); | ||
tag.bonaparte.triggerEvent("bonaparte.internal.closePanels", null, true); | ||
tag.bonaparte.triggerEvent("bonaparte.panel.open", null, true); | ||
} | ||
} | ||
} | ||
@@ -87,4 +87,5 @@ | ||
function lock(){ | ||
if(locked) return; | ||
locked=true; | ||
setTimeout(function(){ locked=false; },0); | ||
setTimeout(function(){ locked=false; }, 100); // Wait for IE Events to be done before unlocking. | ||
} | ||
@@ -91,0 +92,0 @@ } |
7767
90
+ Addedbonaparte-core@0.0.24(transitive)
- Removedbonaparte-core@0.0.23(transitive)
Updatedbonaparte-core@^0.0.24