mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02:00
Merge pull request #8056 from imgntn/editbugztab
Fix tabbing behavior in edit.js
This commit is contained in:
commit
19352a12ea
1 changed files with 7 additions and 16 deletions
|
@ -546,17 +546,10 @@
|
||||||
|
|
||||||
disableProperties();
|
disableProperties();
|
||||||
} else {
|
} else {
|
||||||
var activeElement = document.activeElement;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var selected = (activeElement
|
|
||||||
&& activeElement.selectionStart == 0
|
|
||||||
&& activeElement.selectionEnd == activeElement.value.length);
|
|
||||||
} catch (e) {
|
|
||||||
var selected = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
properties = data.selections[0].properties;
|
properties = data.selections[0].properties;
|
||||||
|
|
||||||
elID.innerHTML = properties.id;
|
elID.innerHTML = properties.id;
|
||||||
|
|
||||||
elType.innerHTML = properties.type;
|
elType.innerHTML = properties.type;
|
||||||
|
@ -571,7 +564,6 @@
|
||||||
} else {
|
} else {
|
||||||
enableProperties();
|
enableProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
elName.value = properties.name;
|
elName.value = properties.name;
|
||||||
|
|
||||||
|
@ -811,11 +803,10 @@
|
||||||
elYTextureURL.value = properties.yTextureURL;
|
elYTextureURL.value = properties.yTextureURL;
|
||||||
elZTextureURL.value = properties.zTextureURL;
|
elZTextureURL.value = properties.zTextureURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected) {
|
var activeElement = document.activeElement;
|
||||||
activeElement.focus();
|
|
||||||
activeElement.select();
|
activeElement.select();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1178,7 +1169,7 @@
|
||||||
for (var i = 0; i < els.length; i++) {
|
for (var i = 0; i < els.length; i++) {
|
||||||
var clicked = false;
|
var clicked = false;
|
||||||
var originalText;
|
var originalText;
|
||||||
els[i].onfocus = function() {
|
els[i].onfocus = function(e) {
|
||||||
originalText = this.value;
|
originalText = this.value;
|
||||||
this.select();
|
this.select();
|
||||||
clicked = false;
|
clicked = false;
|
||||||
|
|
Loading…
Reference in a new issue