Permalink
Browse files

Fixing multi-pseudo demo: pressing any character then enter produced …

…weird results. Also using correct element, not the one that happened to be right
  • Loading branch information...
1 parent 59266e4 commit c4957f5610e4e3bc02fd165ffc14a86087905ec2 @asuth committed Jun 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 demos/Element.Event.Pseudos/demo.js
@@ -23,8 +23,8 @@ window.addEvent('domready', function() {
});
// use multiple pseudos
- $('multiplePseudoText').addEvent('keydown:relay(textarea):keys(enter):once', function(){
- this.getElement('textarea').set('text', 'MooTools!!').highlight();
+ $('multiplePseudoText').addEvent('keydown:relay(textarea):keys(enter):once', function(event, el){
+ el.set('value', 'MooTools!!').highlight();
});
// pause pseudo event, you can define the pause, otherwise it will use the default (250)

0 comments on commit c4957f5

Please sign in to comment.