Closed VincentToups closed 11 years ago
I mean, {"onblur .value-editing":"handleBlur"}, above. Sorry, I am translating from parenscript code.
The work around for this is to call this.buildUIActions() after any modification of the view's dom elements. Whether this should be more automatic or not is a matter for Peter to determine, so I will leave the issue open. I could go either way.
Do all html elements which might produce events which maria will handle need to be in the initial template...?
Yes. uiActions
looks for elements in the initial template. Otherwise they do need to be wired up by hand.
Please reopen if you have more to discuss.
I have a maria template which initially displays data inside a
<div>
. When the user clicks the div, it's text is extracted, placed into an<input>
. The user is meant to edit this input and ononblur
convert itself back to a standard<div>
element, and also update the model. Suppose the input, when it is created, has html class "value-editing"If I declare a ui-action like so
"onblur .value-editing" "handleBlur"
And defined a
handleBlur
on the controller, the event never seems to fire.Do all html elements which might produce events which maria will handle need to be in the initial template or wired up by hand, or am I making some other sort of mistake?