namespace_browser: Mercury (specifically virtual hyper dom) has started
behaving strange when patching textContent on div (possibly all block elements)
as work around we MUST ensure textContent is only on non-block elements
like span.
I will try to pin this down and create an issue on Mercury side.
Change-Id: Iac5fa6b8f1470d8d54e51abadee3d5dfe35e147d
diff --git a/package.json b/package.json
index 526beec..2ff5b19 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"json-stable-stringify": "^1.0.0",
"localforage": "^1.0.2",
"marked": "^0.3.2",
- "mercury": "^11.0.0",
+ "mercury": "^12.0.0",
"routes": "^1.2.0",
"lodash": "~2.4.1",
"xtend": "~4.0.0",
diff --git a/src/components/browse/index.js b/src/components/browse/index.js
index 2b27957..c68f78d 100644
--- a/src/components/browse/index.js
+++ b/src/components/browse/index.js
@@ -269,7 +269,7 @@
}
if (browseState.isFinishedLoadingItems && browseState.items.length === 0) {
mainView.push(h('div.empty',
- (browseState.globQuery ? 'No search results' : 'No children'))
+ h('span',(browseState.globQuery ? 'No search results' : 'No children')))
);
} else {
mainView.push(h('div.items-container', [
diff --git a/src/components/browse/item-details/index.js b/src/components/browse/item-details/index.js
index 95798b1..18d5d46 100644
--- a/src/components/browse/item-details/index.js
+++ b/src/components/browse/item-details/index.js
@@ -216,6 +216,7 @@
/*TODO(aghassemi) make a web component for this*/
function renderFieldItem(label, content, tooltip) {
var hlabel = h('h4', label);
+ content = h('span', content);
if (tooltip) {
// If there is a tooltip, wrap the content in it
content = h('core-tooltip.tooltip', {
diff --git a/src/services/namespace/service.js b/src/services/namespace/service.js
index 461d122..464fdec 100644
--- a/src/services/namespace/service.js
+++ b/src/services/namespace/service.js
@@ -280,23 +280,18 @@
function isGlobbable(objectName) {
return getChildren(objectName).then(function(obs) {
return new Promise(function(resolve, reject) {
- var removeListeners = function() {
- removeWatch();
- obs.events.removeListener('end', onEndListener);
- };
var onEndListener = function() {
// no children
resolve(false);
- removeListeners();
+ removeWatch();
};
// resolve as soon as we find one child
var removeWatch = mercury.watch(obs, function(children) {
if (children.length > 0) {
resolve(true);
- removeListeners();
}
});
- obs.events.on('end', onEndListener);
+ obs.events.once('end', onEndListener);
});
}).catch(function() {
return false;
@@ -405,7 +400,6 @@
// information about a service.
var isMounttable = mountEntry.mT;
-
if (isMounttable) {
return itemFactory.createServerTypeInfo({
key: 'veyron-mounttable',