Trunk listening

I have an ItemView that needs to listen for property input and changes (for older IE versions). Input event works fine, but change property doesn't seem to bind

events:
 'input .textArea': 'someFunction'
 'propertychange .textArea': 'someFunction'

      

It binds when I explicitly set it with on

and off

ex.

@textArea.on, 'input propertychange', someFunction

      

Is this just an event that cannot be linked through the ItemView events

?

So far I know the docs for listenTo

can be used to list events on backbone.js. Is there a way to link these two events using this method. i.e

 @listenTo textArea, 'input properychange', someFunction

      

PS I tried onpropertychange

in events

and it doesn't work either. Also, it should be change change, not keypress/keyup

etc events

+3


source to share


1 answer


'input .textArea': 'someFunction'

      

Must not be



'input.textArea': 'someFunction'

      

instead of this? The selector 'input .textArea'

means that inside the input there is an element with the class name textArea

. Probably not what you wanted ...

0


source







All Articles