Move EditInPlace out of Form (Fixes: reloading EW on EC url update) (#31434)
* Move `EditInPlace` out of `Form` If it is part of the form saving will submit the inner form of EditInPlace and reload EW. * add tests and comments * update snapshot * fix playwright
This commit is contained in:
@@ -113,8 +113,16 @@ const DevtoolsDialog: React.FC<IProps> = ({ roomId, threadRootId, onFinished })
|
||||
<SettingsFlag name="developerMode" level={SettingLevel.ACCOUNT} />
|
||||
<SettingsFlag name="showHiddenEventsInTimeline" level={SettingLevel.DEVICE} />
|
||||
<SettingsFlag name="enableWidgetScreenshots" level={SettingLevel.ACCOUNT} />
|
||||
<SettingsField settingKey="Developer.elementCallUrl" level={SettingLevel.DEVICE} />
|
||||
</Form.Root>
|
||||
{/* The settings field needs to be outside `Form.Root` because `SettingsField` will have a inner Form,
|
||||
Otherwise we end up with a nester `Form` and that prohibits `preventDefault` so setting the value
|
||||
will reload the page.
|
||||
*/}
|
||||
<SettingsField
|
||||
settingKey="Developer.elementCallUrl"
|
||||
level={SettingLevel.DEVICE}
|
||||
aria-label="elementCallUrl"
|
||||
/>
|
||||
</BaseTool>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user