discourse/spec
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
..
db/migrate DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
fabricators FIX: Remove error section when viewing details for received emails (#35228) 2025-10-07 16:25:11 +08:00
fixtures SECURITY: Use nonce-based restrictions during restore 2025-09-30 10:09:46 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers FEATURE: Allow editing theme-owned palettes (#34722) 2025-10-06 09:02:39 +03:00
import_export DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
initializers DEV: Patch ActiveRecord's postgresql adapter .new_client (#33820) 2025-09-18 11:34:37 +08:00
integration FEATURE: Allow editing theme-owned palettes (#34722) 2025-10-06 09:02:39 +03:00
integrity Build(deps): Bump propshaft from 1.2.1 to 1.3.1 (#34967) 2025-09-28 15:13:35 +02:00
jobs FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
lib FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
mailers DEV: Remove ability to use users' names in group mention notifications and mentions shown in emails and added :user_notification_email_options plugin modifier to allow plugins reintroduce this or other modifications to emails (#33449) 2025-07-14 15:20:08 -05:00
models DEV: Improve the helper methods for defining reviewable actions (#35406) 2025-10-21 11:13:13 +11:00
multisite FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
queries/reports UX: Add admin report for associated accounts by login provider (#34187) 2025-08-14 09:24:14 -04:00
requests DEV: Update tag_groups api doc schema (#35520) 2025-10-21 12:43:41 -06:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers FIX: DeleteReplies should use the guardian instead of checking for staff (#35443) 2025-10-16 18:26:41 +02:00
services FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
support FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
system FIX: rich editor link toolbar Max call stack exceeded (#35530) 2025-10-22 08:59:01 -03:00
tasks DEV: Rename theme-transpiler to asset-processor (#35498) 2025-10-20 14:16:46 +01:00
views FIX: Use correct subcategory subfolder path in crawler (#34250) 2025-08-12 16:14:50 +08:00
rails_helper.rb DEV: Add client side settled checks to (un)select_option (#35535) 2025-10-22 13:29:55 +08:00
regenerate_swagger_docs
swagger_helper.rb DEV: add api docs for discourse-calendar events index endpoint (#35400) 2025-10-16 07:39:08 +08:00