Fixed focus on mouse over

This commit is contained in:
jos 2015-12-31 10:05:57 +01:00
parent 0b3fc6956f
commit 5955111b4d
1 changed files with 3 additions and 5 deletions

View File

@ -1959,8 +1959,7 @@ Node.prototype.onEvent = function (event) {
// focus // focus
// when clicked in whitespace left or right from the field or value, set focus // when clicked in whitespace left or right from the field or value, set focus
var domTree = dom.tree; var domTree = dom.tree;
if (target == domTree.parentNode && if (target == domTree.parentNode && type == 'click' && !event.hasMoved) {
type == 'click' && !event.hasMoved) {
var left = (event.offsetX != undefined) ? var left = (event.offsetX != undefined) ?
(event.offsetX < (this.getLevel() + 1) * 24) : (event.offsetX < (this.getLevel() + 1) * 24) :
(event.pageX < util.getAbsoluteLeft(dom.tdSeparator));// for FF (event.pageX < util.getAbsoluteLeft(dom.tdSeparator));// for FF
@ -1978,9 +1977,8 @@ Node.prototype.onEvent = function (event) {
} }
} }
} }
if ((target == dom.tdExpand && !expandable) || target == dom.tdField || if (((target == dom.tdExpand && !expandable) || target == dom.tdField || target == dom.tdSeparator) &&
target == dom.tdSeparator && (type == 'click' && !event.hasMoved)) {
type == 'click' && !event.hasMoved) {
if (domField) { if (domField) {
util.setEndOfContentEditable(domField); util.setEndOfContentEditable(domField);
domField.focus(); domField.focus();