diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index 2b1304a7..189156b7 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -490,6 +490,7 @@ var URLHistoryUIActions = actions.Actions({ // - [ 'open', 'close' ] - explicitly select event // // XXX do we need this??? + // XXX used only in .listURLHistoryOld(..) 'url-history-list-clear': ['open', 'close'], // If true pushing the pin item button will also focus the item @@ -748,7 +749,7 @@ var URLHistoryUIActions = actions.Actions({ to_remove = [] // sort history... - that.sortURLHistory(to_sort) + that.sortURLHistory(to_sort, true) // toggle pins... pins .concat(orig_pins || []) @@ -848,6 +849,10 @@ var URLHistoryUIActions = actions.Actions({ .on('close', function(){ save() }) + .on('pin_button', function(evt, p, e){ + that.config['url-history-focus-on-pin'] + && dialog.select(e) + }) .on('to_top_button', function(evt, p, e){ to_sort.splice(0, 0, p) }) diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 1bc43cfa..e68e452b 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -1067,7 +1067,11 @@ function(list, pins, options){ } // XXX this is slow... - that.dialog.update() + that.dialog + .update() + .then(function(){ + that.dialog.trigger('pin_button', p, cur) + }) }] ;[buttons, pins_buttons] .forEach(function(b){