diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

The textarea element in goog.ui.TextArea doesn't fire 'change' when its value is cleared #503

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Reproduction (tested in Chrome and Firefox):

1. Open the textarea demo at 
http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/textarea.html
2. Open the JavaScript console.
3. Enter goog.events.listen(goog.dom.getElement('t4'), 'change', function() { 
console.log('change'); });
4. Change the content of the last textarea then focus away.
5. Observe that 'change' is fired.
6. Clear the content of the last textarea then focus away.
7. 'change' is not fired, although it should have been.

If the textarea.value = ' ' line is removed from 
goog.ui.Textarea.prototype.shrink_, this issue is gone, but the workaround 
might have other side effects.

Original issue reported on code.google.com by pall...@google.com on 9 Oct 2012 at 2:16

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r2224.

Original comment by Nicholas.J.Santos on 15 Oct 2012 at 6:50