fixed a couple mo minor focus issues...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-15 06:42:18 +03:00
parent da05f429da
commit 03e857dd80
2 changed files with 12 additions and 11 deletions

View File

@ -97,7 +97,7 @@ var OverlayPrototype = {
// 2'nd click -- close overlay // 2'nd click -- close overlay
// //
// XXX HACK: need a better way to do this... // XXX HACK: need a better way to do this...
var focused var focused = document.hasFocus()
var unlock = function() { setTimeout(function(){ focused = true }, 200) } var unlock = function() { setTimeout(function(){ focused = true }, 200) }
var lock = function() { focused = false } var lock = function() { focused = false }
// blur-lock... // blur-lock...
@ -126,13 +126,14 @@ var OverlayPrototype = {
.addClass('blur') .addClass('blur')
.append(this.dom) .append(this.dom)
// focus the client... // pass focus to the client...
if(client.dom && client.focus){ this.on('focus click', function(){
client.focus() if(client.dom && client.focus){
client.focus()
}
})
} else { this.focus()
this.focus()
}
return this return this
}, },

View File

@ -4880,8 +4880,8 @@ var URLHistoryUIActions = actions.Actions({
// move to top... // move to top...
['&diams;', ['&diams;',
function(p){ function(p){
var top = this.filter().first() var top = this.filter('*', false).first()
var cur = this.filter('"'+p+'"') var cur = this.filter('"'+p+'"', false)
if(!top.is(cur)){ if(!top.is(cur)){
top.before(cur) top.before(cur)
@ -4891,7 +4891,7 @@ var URLHistoryUIActions = actions.Actions({
// mark for removal... // mark for removal...
['&times;', ['&times;',
function(p){ function(p){
var e = this.filter('"'+p+'"') var e = this.filter('"'+p+'"', false)
.toggleClass('strike-out') .toggleClass('strike-out')
if(e.hasClass('strike-out')){ if(e.hasClass('strike-out')){
@ -4938,7 +4938,7 @@ var URLHistoryUIActions = actions.Actions({
.select(cur) .select(cur)
.addClass('highlighted') .addClass('highlighted')
return list return o
}], }],
}) })