TiddlyTools/Panels/Maps uses TiddlyTools/Panels/Places to provide a popup "select saved location" interface.
TiddlyTools/Panels/Places uses $eventcatcher widgets to handle $focusin and $change events within the popup interface. When opening the popup, an $edit-text widget with focus=yes is rendered. This triggers a $focusin event. The popup also renders a "saved locations" $select widget. Making a selection triggers a $change event.
When TiddlyTools/Panels/Maps is used from within a regular browser window, the "select saved location" popup interface works as intended, without error. However, if the TiddlyTools/Panels/Maps tiddler is opened in a separate window, then the popup interface immediately causes an "Illegal invocation" RSOD.
The browser debugger reports that the RSOD error is occuring in eventcatcher.js line 196, which shows the following code:
"eventJSON": JSON.stringify($tw.utils.copyObjectPropertiesSafe(event)),
I did a little investigation and found that disabling the $eventcatcher $focusin trigger that precedes the $edit-text widget eliminates that RSOD. However, if you then make a selection in the $select widget the $eventcatcher $change trigger that precedes the $select widget still causes an "Illegal invocation" RSOD to occur. Disabling the $eventcatcher $change trigger eliminates that RSOD. Unfortunately, disabling handling for those events prevents the popup "select saved location" interface from functioning as intended, so that is not an acceptable workaround.
To Reproduce as discovered in situ:
- Go to https://tiddlytools.com/#TiddlyTools%2FPanels%2FMaps
- From the tiddler menu "more" dropdown, select "Open in new window"
- In the newly opened window, click on the "select or save a place" button (the "list" icon between the "[X]" and "[<<]" buttons
- The "Illegal invocation" RSOD (due to the $focusin eventcatcher) appears in the main browser window
To reproduce as a minimal test case:
- Go to https://Tiddlywiki.com
- Create a new tiddler containing:
<$eventcatcher $focusin="<$action-setfield gotfocus=<<now 0hh0mm0ss0XXX>>/>">
TEST1 (focusin): <$edit-text field=test1 focus=yes/> {{!!gotfocus}}
</$eventcatcher>
<$eventcatcher $change="<$action-setfield changed=<<now 0hh0mm0ss0XXX>>/>">
TEST2 (change): <$edit-text field=test2/> {{!!changed}}
</$eventcatcher>
<$eventcatcher $click="<$action-setfield clicked=<<now 0hh0mm0ss0XXX>>/>">
TEST3 (click): <$edit-text field=test3/> {{!!clicked}}
</$eventcatcher>
<$eventcatcher $mouseover="<$action-setfield hover=<<now 0hh0mm0ss0XXX>>/>">
TEST4 (hover): <$edit-text field=test4/> {{!!hover}}
</$eventcatcher>
- From the tiddler menu "more" dropdown, select "Open in new window"
- An "Illegal invocation" RSOD (due to the $focusin eventcatcher) immediately appears in the main browser window
- Dismiss the RSOD and return to the new window (containing the
$edit-text widgets)
- Put the focus into the TEST2 input control, enter some text, and click outside the input control to trigger the $change eventcatcher.
- An "Illegal invocation" RSOD (due to the $change eventcatcher) appears in the main browser window
Note: The RSOD seems to occur for ANY event triggered from the secondary window.
TiddlyTools/Panels/Maps uses TiddlyTools/Panels/Places to provide a popup "select saved location" interface.
TiddlyTools/Panels/Places uses
$eventcatcherwidgets to handle$focusinand$changeevents within the popup interface. When opening the popup, an$edit-textwidget withfocus=yesis rendered. This triggers a$focusinevent. The popup also renders a "saved locations"$selectwidget. Making a selection triggers a$changeevent.When TiddlyTools/Panels/Maps is used from within a regular browser window, the "select saved location" popup interface works as intended, without error. However, if the TiddlyTools/Panels/Maps tiddler is opened in a separate window, then the popup interface immediately causes an "Illegal invocation" RSOD.
The browser debugger reports that the RSOD error is occuring in
eventcatcher.jsline 196, which shows the following code:I did a little investigation and found that disabling the
$eventcatcher $focusintrigger that precedes the$edit-textwidget eliminates that RSOD. However, if you then make a selection in the$selectwidget the$eventcatcher $changetrigger that precedes the$selectwidget still causes an "Illegal invocation" RSOD to occur. Disabling the$eventcatcher $changetrigger eliminates that RSOD. Unfortunately, disabling handling for those events prevents the popup "select saved location" interface from functioning as intended, so that is not an acceptable workaround.To Reproduce as discovered in situ:
To reproduce as a minimal test case:
$edit-textwidgets)Note: The RSOD seems to occur for ANY event triggered from the secondary window.