@@ -43,7 +43,7 @@ $.widget("ui.menu", {
43
43
}
44
44
var target = $ ( event . target ) . closest ( ".ui-menu-item" ) ;
45
45
if ( target . length && target . parent ( ) [ 0 ] === self . element [ 0 ] ) {
46
- self . activate ( event , target ) ;
46
+ self . focus ( event , target ) ;
47
47
}
48
48
} )
49
49
. bind ( "mouseout.menu" , function ( event ) {
@@ -52,7 +52,7 @@ $.widget("ui.menu", {
52
52
}
53
53
var target = $ ( event . target ) . closest ( ".ui-menu-item" ) ;
54
54
if ( target . length && target . parent ( ) [ 0 ] === self . element [ 0 ] ) {
55
- self . deactivate ( event ) ;
55
+ self . blur ( event ) ;
56
56
}
57
57
} ) ;
58
58
this . refresh ( ) ;
@@ -118,9 +118,9 @@ $.widget("ui.menu", {
118
118
. attr ( "tabIndex" , - 1 ) ;
119
119
} ,
120
120
121
- activate : function ( event , item ) {
121
+ focus : function ( event , item ) {
122
122
var self = this ;
123
- this . deactivate ( ) ;
123
+ this . blur ( ) ;
124
124
if ( this . _hasScroll ( ) ) {
125
125
var borderTop = parseFloat ( $ . curCSS ( this . element [ 0 ] , "borderTopWidth" , true ) ) || 0 ,
126
126
paddingtop = parseFloat ( $ . curCSS ( this . element [ 0 ] , "paddingTop" , true ) ) || 0 ,
@@ -147,7 +147,7 @@ $.widget("ui.menu", {
147
147
this . _trigger ( "focus" , event , { item : item } ) ;
148
148
} ,
149
149
150
- deactivate : function ( event ) {
150
+ blur : function ( event ) {
151
151
if ( ! this . active ) {
152
152
return ;
153
153
}
@@ -179,21 +179,21 @@ $.widget("ui.menu", {
179
179
180
180
_move : function ( direction , edge , filter , event ) {
181
181
if ( ! this . active ) {
182
- this . activate ( event , this . element . children ( edge ) [ filter ] ( ) ) ;
182
+ this . focus ( event , this . element . children ( edge ) [ filter ] ( ) ) ;
183
183
return ;
184
184
}
185
185
var next = this . active [ direction + "All" ] ( ".ui-menu-item" ) . eq ( 0 ) ;
186
186
if ( next . length ) {
187
- this . activate ( event , next ) ;
187
+ this . focus ( event , next ) ;
188
188
} else {
189
- this . activate ( event , this . element . children ( edge ) [ filter ] ( ) ) ;
189
+ this . focus ( event , this . element . children ( edge ) [ filter ] ( ) ) ;
190
190
}
191
191
} ,
192
192
193
193
nextPage : function ( event ) {
194
194
if ( this . _hasScroll ( ) ) {
195
195
if ( ! this . active || this . last ( ) ) {
196
- this . activate ( event , this . element . children ( ".ui-menu-item" ) . first ( ) ) ;
196
+ this . focus ( event , this . element . children ( ".ui-menu-item" ) . first ( ) ) ;
197
197
return ;
198
198
}
199
199
var base = this . active . offset ( ) . top ,
@@ -204,17 +204,17 @@ $.widget("ui.menu", {
204
204
return $ ( this ) . offset ( ) . top - base - height < 0 ;
205
205
} ) ;
206
206
207
- this . activate ( event , result ) ;
207
+ this . focus ( event , result ) ;
208
208
} else {
209
- this . activate ( event , this . element . children ( ".ui-menu-item" )
209
+ this . focus ( event , this . element . children ( ".ui-menu-item" )
210
210
[ ! this . active || this . last ( ) ? "first" : "last" ] ( ) ) ;
211
211
}
212
212
} ,
213
213
214
214
previousPage : function ( event ) {
215
215
if ( this . _hasScroll ( ) ) {
216
216
if ( ! this . active || this . first ( ) ) {
217
- this . activate ( event , this . element . children ( ".ui-menu-item" ) . last ( ) ) ;
217
+ this . focus ( event , this . element . children ( ".ui-menu-item" ) . last ( ) ) ;
218
218
return ;
219
219
}
220
220
@@ -226,9 +226,9 @@ $.widget("ui.menu", {
226
226
return $ ( this ) . offset ( ) . top - base + height > 0 ;
227
227
} ) ;
228
228
229
- this . activate ( event , result ) ;
229
+ this . focus ( event , result ) ;
230
230
} else {
231
- this . activate ( event , this . element . children ( ".ui-menu-item" )
231
+ this . focus ( event , this . element . children ( ".ui-menu-item" )
232
232
[ ! this . active || this . first ( ) ? ":last" : ":first" ] ( ) ) ;
233
233
}
234
234
} ,
0 commit comments