Commit 8c9aa66a authored by Romain Courteaud's avatar Romain Courteaud 🐙

erp5_web_renderjs_ui: relation field: do not crash in readonly mode

parent f34ae161
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <unicode>zope</unicode> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1019.35820.17369.64529</string> </value>
<value> <string>1019.25501.60945.10018</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1727282760.47</float>
<float>1730989130.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -555,6 +555,9 @@
next_event,
active_index,
ul = gadget.element.querySelector(".search_ul");
if (ul === null) {
return;
}
if (evt.key === "ArrowDown" || evt.key === "ArrowUp") {
if (ul.childNodes.length > 0) {
for (i = 0; i < ul.childNodes.length; i += 1) {
......@@ -614,6 +617,9 @@
var gadget = this,
i,
ul = gadget.element.querySelector(".search_ul");
if (ul === null) {
return;
}
if (evt.target.tagName.toLowerCase() === 'li') {
for (i = 0; i < ul.childNodes.length; i += 1) {
ul.childNodes[i].classList.remove('active');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment