Merge branch 'v1_1_x'

This commit is contained in:
Pierre-Yves Gérardy 2017-09-26 22:15:24 +02:00
commit 5b727f0070
3 changed files with 10 additions and 2 deletions

View file

@ -10,6 +10,13 @@
---
### v1.1.4
#### Bug fixes:
- Fix IE bug where active element is null causing render function to throw error. ([1943](https://github.com/MithrilJS/mithril.js/pull/1943))
---
### v1.1.3
#### Bug fixes:

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "mithril",
"version": "1.1.2",
"version": "1.1.3",
"lockfileVersion": 1,
"dependencies": {
"@alrra/travis-scripts": {

View file

@ -622,7 +622,8 @@ module.exports = function($window) {
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
dom.vnodes = vnodes
for (var i = 0; i < hooks.length; i++) hooks[i]()
if ($doc.activeElement !== active) active.focus()
// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement
if (active != null && $doc.activeElement !== active) active.focus()
}
return {render: render, setEventCallback: setEventCallback}