discourse/spec/system/composer
Renato Atilio f9692f6512
FIX: rich editor link toolbar Max call stack exceeded (#35530)
`getBoundingClientRect()` calls `#getTriggerClientRect()`
`#getTriggerClientRect()` calls `this.#view.coordsAtPos(head)`
`coordsAtPos()` internally calls `getBoundingClientRect()` on the
trigger element

Which may creates an infinite loop / `Maximum call stack size exceeded`.

This PR adds a `this.#calculatingCoords` guard to make sure we don't
call `#getTriggerClientRect` again during the `coordsAtPos` call.

To reproduce the issue, you can follow the same steps as the added test
case:
- type a `[link](link)`
- cmd/ctrl-a to select all
- type anything to replace it

You should see a `Maximum call stack size exceeded` console output.
2025-10-22 08:59:01 -03:00
..
category_templates_spec.rb DEV: Fix system tests not relying on capybara matchers (#35281) 2025-10-08 21:30:04 +08:00
default_to_subcategory_spec.rb FEATURE: new topic button always enabled (#34603) 2025-09-16 17:01:49 +04:00
dont_feed_the_trolls_popup_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
drafts_spec.rb FIX: Handle cancel action in topic reply choice dialog (#35534) 2025-10-22 14:42:57 +10:00
post_validation_spec.rb DEV: Automatically update groups for test users with explicit TL (#25415) 2024-01-29 17:52:02 +08:00
prosemirror_editor_spec.rb FIX: rich editor link toolbar Max call stack exceeded (#35530) 2025-10-22 08:59:01 -03:00
review_media_unless_trust_level_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
template_validation_spec.rb FEATURE: Implement tag group selection in dropdown and multi-select for topic creation and preview when using Form Templates (#32108) 2025-04-17 08:38:03 -05:00