-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Use the
each key=""
parameter to force ember to reuse DOM (#7550)
Ember tries to reuse DOM elements when it can but as ember looks for changes to objects rather than the DOM itself sometimes. This and the fact that an objects identity may change even though its value hasn't, results in ember occasionally re-mutating DOM when it doesn't need to. The `each` helper includes a `key` attribute to hint to ember what it should look for when deciding whether something has changed, rather than the objects identity. https://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/each#specifying-keys We use this here to fix an issue where DOM was being redrawn after the user had scrolled the page and was therefore resetting the scroll back to 0 (the top of the page)
- Loading branch information
Showing
3 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters