Skip to content

Fix inline popover re renders#2992

Closed
akulistus wants to merge 7 commits intonextfrom
fix-inline-popover-re-renders
Closed

Fix inline popover re renders#2992
akulistus wants to merge 7 commits intonextfrom
fix-inline-popover-re-renders

Conversation

@akulistus
Copy link
Contributor

Problem:
Inline-popover re-renders constantly while text with link-tool formatting is selected.

Description:
Value assignment at line-215 causes a selectionchange event that triggers inline-popover re-render.

example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>selectionchange demo</title>
</head>
<body>
  <button id="valueBtn">Set value</button>
  <button id="defaultValueBtn">Set defaultValue</button>
  <br /><br />

  <input id="input" />

  <script>
    const input = document.getElementById('input');

    document.addEventListener('selectionchange', () => {
      console.log('selectionchange');
    });

    document.getElementById('valueBtn').onclick = () => {
      input.value = 'value text';
      console.log('value set');
    };

    document.getElementById('defaultValueBtn').onclick = () => {
      input.defaultValue = 'defaultValue text';
      console.log('defaultValue set');
    };
  </script>
</body>
</html>

Issue:
#2987

Solution:
Change input value assignment to defaultValue to prevent the selectionchange event.

@akulistus akulistus closed this Feb 24, 2026
@akulistus akulistus deleted the fix-inline-popover-re-renders branch February 24, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant