Closed contreras-jorgev closed 8 years ago
parentElement is not defined (but parentNode is) ... then we try to use "insertBefore" and Javascript crashes ...
It looks like the code in edit-table.js (script):
var _replaceTableNameUI = function(formerTableEl, labelValue) {
var newLabel = document.createElement('Label');
var formerTableName = formerTableEl.innerText;
newLabel.innerHTML = labelValue;
var newInput = document.createElement('input');
newInput.id = formerTableEl.id;
newInput.value = formerTableName;
newInput.setAttribute('am-table-name', '');
newInput.setAttribute(FORMER_TABLE_NAME_DATA, formerTableName );
formerTableEl.parentElement.replaceChild( newInput, formerTableEl );
newInput.parentElement.insertBefore(newLabel, newInput);
for( var i=0; i<2; i++ ) {
var br = document.createElement('br');
var next = newInput.nextSibling;
next.parentElement.insertBefore(br,next); <==== HERE !!!
}
return newInput;
};
/* Old code - IE11 fails on next.parentElement !!!
for (var i = 0; i < 2; i++) {
var br = document.createElement('br');
var next = newInput.nextSibling;
next.parentElement.insertBefore(br, next);
}
*/
/* Fix */
var parent = newInput.parentElement;
for (var i = 0; i < 2; i++) {
var br = document.createElement('br');
var next = newInput.nextSibling;
parent.insertBefore(br, next);
}
On IE Edge, if we move the closing after the "edit-actions" section, the buttons and comments re-appear!
Also, on Edge, the following fixes the weird font used on textarea:
Tablepedia.css:
html, textarea { /* Add textarea */ font-family: 'Open Sans', Verdana, sans-serif; color: #595959; font-size: 14px; }
Looks like the "textarea" element is not behaving the same as in Safari & Chrome.
Also the buttons on the bottom (Create, comments, etc.) are not visible.