forked from 0x2620/oxjs
fix for MenuButton and Select double button toggle
This commit is contained in:
parent
66a041ef30
commit
a9c026f6db
2 changed files with 10 additions and 6 deletions
|
|
@ -90,7 +90,9 @@ Ox.Select = function(options, self) {
|
|||
width: self.options.width - 2 + 'px'
|
||||
})
|
||||
.bindEvent({
|
||||
anyclick: showMenu,
|
||||
anyclick: function(e) {
|
||||
showMenu($(e.target).is('.OxButton') ? 'button' : null);
|
||||
},
|
||||
key_escape: loseFocus,
|
||||
key_down: showMenu
|
||||
});
|
||||
|
|
@ -214,10 +216,10 @@ Ox.Select = function(options, self) {
|
|||
|
||||
}
|
||||
|
||||
function showMenu() {
|
||||
function showMenu(from) {
|
||||
that.gainFocus();
|
||||
that.addClass('OxSelected');
|
||||
self.$button.options({value: true});
|
||||
from != 'button' && self.$button.options({value: true});
|
||||
self.options.tooltip && that.$tooltip.hide();
|
||||
self.$menu.showMenu();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue