Posts

Posts mit dem Label "Focus" werden angezeigt.

SPFx: BaseDialog from microsoft/sp-dialog and lost focus issue

Bild
I had a strange issue while developing a new SPFx List command extension. My custom list command opens a dialog to enter some data. The dialog works perfectly for the first time. But after I had closed and opened the dialog again, I was unable to enter data in any input fields. Other UI components, like toggle or radio buttons, were not affected, and I could use them without any issue. After digging around and inspecting the source HTML code, I discovered an iframe with id = o365shellwcssframe, as you can see in the image below. iframe issue This iframe has an initial CSS display style set to "block", but after reopening the dialog, the value changes to "none". I just changed the value back to block and after this, the dialog started to work as expected. I made the adjustment during the event "BeforeOpen" inside my custom dialog component. export class AlertDialog extends BaseDialog { ... protected onBeforeOpen(): Promise<void> { con...