minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-09-10 05:17:05 +03:00
parent e07e627351
commit 427d17b6c8
2 changed files with 12 additions and 4 deletions

View File

@ -1787,7 +1787,6 @@ var BrowseActionsActions = actions.Actions({
&& actions.showDoc(action) && actions.showDoc(action)
} }
this.keyboard.handler('General', '?', 'showDoc') this.keyboard.handler('General', '?', 'showDoc')
this.menu(showDoc.bind(this)) this.menu(showDoc.bind(this))
}) })

View File

@ -2226,6 +2226,11 @@ var BrowserPrototype = {
var interactive = false var interactive = false
var size_freed = false var size_freed = false
// NOTE: this is only used for the contextmenu event...
var debounced = false
setTimeout(function(){ debounced = true }, 100)
//---------------------- prepare for new keyboard shortcuts --- //---------------------- prepare for new keyboard shortcuts ---
// clear previous shortcuts... // clear previous shortcuts...
var item_shortcuts = this.options.setItemShortcuts ? var item_shortcuts = this.options.setItemShortcuts ?
@ -2396,9 +2401,13 @@ var BrowserPrototype = {
.click(function(){ .click(function(){
!$(this).hasClass('disabled') !$(this).hasClass('disabled')
&& that.push($(this)) }) && that.push($(this)) })
.on('contextmenu', function(){ .on('contextmenu', function(evt){
that.select($(this)) evt.preventDefault()
res.trigger('menu', txt) evt.stopPropagation()
debounced
&& that.select($(this))
&& res.trigger('menu', txt)
}) })
// append text elements... // append text elements...
.append(p) .append(p)