mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Add keys to gutterContainer and scrollContainer to avoid recycling issue
Previously, when the gutter container was removed due to the editor becoming mini, the lack of keys caused the gutter to be updated with the recycled cursors vnode. But then we tried to remove the cursors vnode not realizing it had been moved and tore down all the references. We probably need to revisit whether it makes sense to recycle vnodes.
This commit is contained in:
committed by
Antonio Scandurra
parent
240a472d3a
commit
4d8137a7f5
@@ -426,6 +426,7 @@ class TextEditorComponent {
|
||||
this.gutterContainerVnode = $.div(
|
||||
{
|
||||
ref: 'gutterContainer',
|
||||
key: 'gutterContainer',
|
||||
className: 'gutter-container',
|
||||
style: {
|
||||
position: 'relative',
|
||||
@@ -506,6 +507,7 @@ class TextEditorComponent {
|
||||
return $.div(
|
||||
{
|
||||
ref: 'scrollContainer',
|
||||
key: 'scrollContainer',
|
||||
className: 'scroll-view',
|
||||
style
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user