ensure redrawing in event handlers
This commit is contained in:
parent
6fccbc0b0a
commit
f321750896
2 changed files with 17 additions and 3 deletions
|
|
@ -174,9 +174,8 @@ Mithril = m = new function app(window) {
|
|||
function autoredraw(callback, object) {
|
||||
return function(e) {
|
||||
m.startComputation()
|
||||
var output = callback.call(object, e)
|
||||
m.endComputation()
|
||||
return output
|
||||
try {return callback.call(object, e)}
|
||||
finally {m.endComputation()}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue