diff --git a/ui (gen4)/features/alias.js b/ui (gen4)/features/alias.js index ca9ed633..b9ff3e6a 100755 --- a/ui (gen4)/features/alias.js +++ b/ui (gen4)/features/alias.js @@ -184,7 +184,9 @@ var UIAliasActions = actions.Actions({ // XXX should we set white-space: pre on doc here or in css??? // XXX multiline doc edit does not work... // XXX edit key bindings (???) - // XXX BUG: doc not savable... + // XXX BUG: moving up/down out of a field will not save that field... + // XXX BUG: can't use multi-line fields... + // XXX BUG: renaming alias breaks .browseActions(..) editAlias: ['- System/Edit alias...', widgets.makeUIDialog(function(alias){ var that = this @@ -199,8 +201,7 @@ var UIAliasActions = actions.Actions({ edit_text: 'last', clear_on_edit: false, reset_on_commit: false, - // XXX bug -- error + clear field??? - //abort_on_deselect: false, + abort_on_deselect: false, } // doc fields... diff --git a/ui (gen4)/lib/util.js b/ui (gen4)/lib/util.js index 2c62c416..f7bb991c 100755 --- a/ui (gen4)/lib/util.js +++ b/ui (gen4)/lib/util.js @@ -543,7 +543,7 @@ if(typeof(jQuery) != typeof(undefined)){ // make the element focusable and selectable... .attr('tabindex', '0') .addClass('editable-field') - .keydown(events.keydown = function(jqevt){ + .keydown(events.keydown = function(in_evt){ var evt = window.event || in_evt if(!that.prop('contenteditable')){ return @@ -576,7 +576,7 @@ if(typeof(jQuery) != typeof(undefined)){ } else if(options.propagate_unhandled_keys !== false){ // NOTE: jQuery can't reuse browser events, this // we need to pass a jq event/proxy here... - $(this).parent().trigger(in_evt) + $(this).parent().trigger(in_evt || evt) } }) .blur(events.blur = function(){ diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 903e8077..d281ca7a 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -356,9 +356,11 @@ function(text, options){ }) .on('deselect', function(){ //editable && editable.trigger( - getEditable() + var editable = getEditable() + // XXX need to pass the text.... + editable .trigger( - options.abort_on_deselect !== false ? 'edit-abort' : 'edit-commit') + options.abort_on_deselect !== false ? 'edit-abort' : 'edit-commit', editable.text()) }) stop_propagation