summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e80ebc5)
If node was saved via the save button, the blur event handler was not
unbound and was called on the next blur event.
If this blur event resulted from clicking the edit
button on another node, the XNodeAttributes from that
node were set to the old one handled by unbound event handler,
because those attributes were always taken from the currently
edited node.
});
$overlay.append($attributes);
});
$overlay.append($attributes);
+ var overlayParent = $box[0].offsetParent || $box.parent();
$overlay.css({
position: 'absolute',
height: h,
left: x,
top: y,
width: w
$overlay.css({
position: 'absolute',
height: h,
left: x,
top: y,
width: w
- }).appendTo($box[0].offsetParent || $box.parent()).show();
+ }).appendTo(overlayParent).show();
if ($origin.is('.motyw')) {
if ($origin.is('.motyw')) {
}
/* Set attributres back to the node */
var attrs = {};
}
/* Set attributres back to the node */
var attrs = {};
- $(".html-editarea-attributes [name]")
+ $(".html-editarea-attributes [name]", overlayParent)
.each(function(i, textField) {
attrs[textField.name] = textField.value;
});
.each(function(i, textField) {
attrs[textField.name] = textField.value;
});
$('.accept-button', $overlay).click(function(){
save();
$('.accept-button', $overlay).click(function(){
save();
+ $(document).unbind('click.blur-overlay');
});
$(document).bind('click.blur-overlay', function(event){
});
$(document).bind('click.blur-overlay', function(event){