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

View File

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