Simple forum software for building great communities.
Go to file
Toby Zerner 538a3e5e98 Prevent infinite redraw loop in IE
Welp, this is probably the most subtle bug I've ever tracked down and fixed.

Turns out that IE has this bug where the "oninput" event will be triggered whenever the "placeholder" attribute is changed. Most placeholders get their value from app.trans. The app.trans method returns a VirtualElement – which is an array, not a string! That means when Mithril's diffing algorithm was comparing the old value to the new value, it was comparing two different array instances, and thus deciding the value was dirty and the placeholder attribute needed to be updated. Due to the IE bug, that was leading to the "oninput" event being triggered... and then through Mithril's auto-redraw mechanism, a redraw would be triggered, and so the cycle continued.

Since the inputs in the LogInModal (among others) only update the component state on the "onchange" event (i.e. when the input loses focus), the intermittent redraws would cause the input's value to be cleared continuously. That's what was causing #464. Could've been easily and superficially patched by changing them to use "oninput" events, but luckily I dived a little deeper!

Glad that's over. Running IE11's buggy dev tools in an underpowered VM isn't fun. Would not recommend.

closes #464
2015-09-25 23:44:15 +09:30
js Prevent infinite redraw loop in IE 2015-09-25 23:44:15 +09:30
less Condense discussion list last reply icons 2015-09-25 13:55:32 +09:30
migrations Allow discussions to be hidden and restored 2015-09-22 17:48:21 +09:30
public/fonts Update to FontAwesome 4.4.0 2015-09-22 17:11:51 +09:30
spec/Flarum/Core/Settings Add header comment; PSR-2 fixes; remove seeders 2015-08-26 16:56:32 +09:30
src Extract English translations into a language pack 2015-09-25 16:12:09 +09:30
stubs Add migration generator 2015-09-17 12:16:38 +09:30
views Fix last commit 2015-09-23 18:30:28 +02:00
.editorconfig Clean up editorconfig, eslint, npm dependencies 2015-09-04 12:11:34 +09:30
.eslintignore Add JavaScript eslint config 2015-07-05 21:25:09 +09:30
.eslintrc Clean up editorconfig, eslint, npm dependencies 2015-09-04 12:11:34 +09:30
.gitattributes Include the extension stub's .gitignore file 2015-08-29 18:29:33 +09:30
.gitignore Don't ignore FontAwesome fonts 2015-03-30 15:50:36 +10:30
.php_cs Add header comment; PSR-2 fixes; remove seeders 2015-08-26 16:56:32 +09:30
.travis.yml Fix last commit 2015-08-30 15:02:48 +02:00
CHANGELOG.md Update changelog for bundled extensions 2015-09-22 18:20:32 +09:30
composer.json Update TextFormatter 2015-09-23 09:03:24 +02:00
composer.lock Update TextFormatter 2015-09-23 09:03:24 +02:00
CONTRIBUTING.md Add CONTRIBUTING 2015-08-29 18:29:19 +09:30
LICENSE Update links and remove license file extension 2015-08-27 19:56:37 +09:30
README.md Update links and remove license file extension 2015-08-27 19:56:37 +09:30

Flarum Core

This repository contains the core code of Flarum. If you want to install Flarum, visit the main Flarum repository.

Contributing

Interested in contributing to Flarum? Please read the Contributing docs to learn how you can help.