| Page 1 of 1 | [ 3 posts ] |
|
I'm trying to set the hideOn attribute in the following way:
Code: var panel = new Y.Panel({ srcNode: '#searchBox'+dailyMealId, width : 800, modal : true, // Make the Panel modal centered: true, visible: false, plugins: [Y.Plugin.Drag], // The `hideOn` Attribute takes an array of objects with a required // `eventName` property, and two optional properties: // `node` and `keyCode`. hideOn: [ {eventName: 'key', keyCode: '27'}, {eventName: 'clickoutside'} ] }); The panel correctly hides when I click outside it, but does not seem to listen to the 'key' event when I hit escape. Is my syntax wrong or is there a bug? |
|
Try:
Code: { node: Y.one('doc'), eventName: 'key', keyCode: 'esc' } See: https://github.com/yui/yui3/blob/master ... ide.js#L69 |
|
That worked! Thanks dude.
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group