You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
Current behavior:
Sometimes input directives model (viewValue) is not updated when typing to input field. Expected / new behavior:
viewValue and input value are same after typing.
Minimal reproduction of the problem with instructions:
Sometimes input directives model (viewValue) is not updated when typing to input field.
This occurs with fast typing and slow computer.
This happens because in IE, angular listens keydown -event and has timeout handling that skips new keystrokes if handling of previous keydown is ongoing.
And previous ongoing keydown handling reads old value of input because the value is not updated immediately when key is pressed down.
I.e. we would cancel the pending timeout and set a new one each time.
As a result the model would be updated later if the user types too fast. If we consider this a problem, we could use proper deferring in addition to the current implementation.
changed the title [-]Input directive model isn't randomly updated in IE.[/-][+]Input directive model sometimes isn't updated in IE when typing fast[/+]on Apr 5, 2018
How is a bug in a core functionality of AngularJS not serious? 😅 If I understand correctly, when this happens, users will see something on the screen different than the underlying value kept in JavaScript. If this is truly the case, I sure hope no one is using AngularJS for anything... serious.
AngularJS is a mature legacy project, which is no longer being actively developed. We instigated LTS mode last summer, to provide basic on-going support for 3 years. This includes fixing recent regressions (introduced by commits since 1.7.0), security concerns and catastrophic failures caused to by changes to things outside of our control (e.g. new releases of browsers or JQuery).
Although this is indeed a bug in the core, it is not a recent regression, and does not appear to affect a large number of projects. Moreover it only appears to impact apps running on a few legacy browsers.
Therefore it is not on our road map for fixing in a future release.
One of the benefits of AngularJS no longer receiving significant development, is that it is now much less risky to fork the project and fix bugs that are specific to your scenario. Previously this was not recommended as it would involve a significant effort to ensure that your fork was kept up to date with the main AngularJS project. Since LTS began there are very few changes to AngularJS and so forking the project is now a much more viable approach for bugs like this.
@jheusala, I am not sure what you mean by "make my own deployment package". If you are asking how to build AngularJS to generate production scripts (to include in your app) from your local copy of the repo, you find the commands here. (Hint: It's yarn grunt package 😉)
I have tested this fix and it makes input on IE much more responsive. It's still too early to tell if the problem with last character missing is fixed, but I have not seen that happen anymore.
If I would do a merge request, is there any chance this fix could be accepted to LTS? Sure, it's an EOL browser, but some of us still need to support it, and this is clearly a bug in AngularJS.
PS: I saw there was other places in the code using the same paradigm of ignoring event if timeout was already in place. My fix is precisely to this input event problem; there may be other bugs affected by the same paradigm.
AFAIK it also does not affect modern browsers, since this part of the code is in IE-only block. Unless there is other (legacy) browsers that use it; in that case, it would be a bug for them, too.
I'm afraid this won't happen, @jheusala. We are ourselves tempted to keep fixing stuff like this, but such bugs will always be around and we should stick to our LTS policy 🕴
Activity
gkalpak commentedon Apr 4, 2018
A solution would be to actually defer the listener (right now it seems that we use a mix of throttling/deferring):
angular.js/src/ng/directive/input.js
Lines 1325 to 1334 in b7d396b
I.e. we would cancel the pending timeout and set a new one each time.
As a result the model would be updated later if the user types too fast. If we consider this a problem, we could use proper deferring in addition to the current implementation.
[-]Input directive model isn't randomly updated in IE.[/-][+]Input directive model sometimes isn't updated in IE when typing fast[/+]jkopponen commentedon Jan 4, 2019
Hi,
I am just wondering is there any progress with this issue?
This has been assigned over 6 months.
jbedard commentedon Jan 13, 2019
This most likely won't be fixed as the project is now in LTS mode and only serious/security issues will be fixed.
inad9300 commentedon Jan 23, 2019
How is a bug in a core functionality of AngularJS not serious? 😅 If I understand correctly, when this happens, users will see something on the screen different than the underlying value kept in JavaScript. If this is truly the case, I sure hope no one is using AngularJS for anything... serious.
petebacondarwin commentedon Jan 23, 2019
AngularJS is a mature legacy project, which is no longer being actively developed. We instigated LTS mode last summer, to provide basic on-going support for 3 years. This includes fixing recent regressions (introduced by commits since 1.7.0), security concerns and catastrophic failures caused to by changes to things outside of our control (e.g. new releases of browsers or JQuery).
Although this is indeed a bug in the core, it is not a recent regression, and does not appear to affect a large number of projects. Moreover it only appears to impact apps running on a few legacy browsers.
Therefore it is not on our road map for fixing in a future release.
One of the benefits of AngularJS no longer receiving significant development, is that it is now much less risky to fork the project and fix bugs that are specific to your scenario. Previously this was not recommended as it would involve a significant effort to ensure that your fork was kept up to date with the main AngularJS project. Since LTS began there are very few changes to AngularJS and so forking the project is now a much more viable approach for bugs like this.
Cancel previous timeout instead of ignoring events
thejhh commentedon Apr 12, 2019
I made the fix in the above commit and also run tests with Travis-CI. However, I'm not sure how to make my own deployment package yet.
gkalpak commentedon Apr 14, 2019
@jheusala, I am not sure what you mean by "make my own deployment package". If you are asking how to build AngularJS to generate production scripts (to include in your app) from your local copy of the repo, you find the commands here. (Hint: It's
yarn grunt package
😉)thejhh commentedon Apr 15, 2019
I have tested this fix and it makes input on IE much more responsive. It's still too early to tell if the problem with last character missing is fixed, but I have not seen that happen anymore.
If I would do a merge request, is there any chance this fix could be accepted to LTS? Sure, it's an EOL browser, but some of us still need to support it, and this is clearly a bug in AngularJS.
PS: I saw there was other places in the code using the same paradigm of ignoring event if timeout was already in place. My fix is precisely to this input event problem; there may be other bugs affected by the same paradigm.
thejhh commentedon Apr 15, 2019
AFAIK it also does not affect modern browsers, since this part of the code is in IE-only block. Unless there is other (legacy) browsers that use it; in that case, it would be a bug for them, too.
gkalpak commentedon Apr 16, 2019
I'm afraid this won't happen, @jheusala. We are ourselves tempted to keep fixing stuff like this, but such bugs will always be around and we should stick to our LTS policy 🕴