sun-dragon-cult / fvtt-system-rqg

Runequest Glorantha Foundry VTT system
https://sun-dragon-cult.github.io/
Other
20 stars 2 forks source link

Dragging a document to an editor causes an RqgError since the target is not an HTMLElement #698

Open claycle opened 9 months ago

claycle commented 9 months ago

Dragging Journal Item to Character Sheet (Background) Creates Exception

I wanted to add some journal links to the character sheet background section so that players could quickly reference items/journal items during play.

With a player's personal journal open, I began editing their background and info section on the character sheet. I then dragged the desired journal item to the character sheet and the following uncaught exception began to be thrown:

Screenshot 2024-02-24 at 9 47 13 AM Screenshot 2024-02-24 at 10 06 03 AM

Despite the flurry of uncaught exceptions being announced on the screen and in the console, the operation completes and the link is created:

Screenshot 2024-02-24 at 10 04 55 AM

How: To Reproduce

Steps to reproduce the behavior:

  1. Open character sheet and begin editing the Background and Info text section.
  2. Open a journal, select a journal item, and drag the journal item to the character sheet.
  3. Uncaught exceptions are generated.
  4. See above image of error.

Expected behavior

Doing this action should not generate so many uncaught exceptions.

Screenshots

See above.

Environment - please paste the information from foundry settings tab "support" button:

I tested this in three browsers, Firefox, Arc, and Safari. Interestingly, the exceptions were not thrown in Safari.

Foundry Virtual Tabletop: Version 11 Stable, 11.315 Game System: rqg, 3.4.2 Active Modules: 37 Performance Mode: 1

OS: Unknown Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 GPU: ANGLE (ATI Technologies Inc., AMD Radeon Pro Vega 64 OpenGL Engine, OpenGL 4.1) Max Texture Size: 16384

Scene: 4512 x 2632 | Grid Size: 100 | Padding Percentage: 0.25 Walls: 0 | Ambient Lights: 0 | Ambient Sounds: 0 | Tiles: 10 | Tokens: 0

Actors: 16 | Items: 12 | Journal Entries: 192 | Rollable Tables: 0 | Playlists: 6 | Compendium Packs: 62 | Chat Messages: 5

wake42 commented 5 months ago

I've reproduced the problem, and the issue if you pass one of the icons in the editor while dragging. It's an annoyance I agree and I will have a look at it. Once you know it's easy to avoid passing the icons to avoid the exception.