File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/feedback-async/src/widget Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ export function createWidget({
40
40
} : CreateWidgetParams ) : FeedbackWidget {
41
41
let actor : ActorComponent | undefined ;
42
42
let dialog : DialogComponent | undefined ;
43
- let isDialogOpen : boolean = false ;
44
43
45
44
/**
46
45
* Show the success message for 5 seconds
@@ -152,7 +151,7 @@ export function createWidget({
152
151
try {
153
152
if ( dialog ) {
154
153
dialog . open ( ) ;
155
- isDialogOpen = true ;
154
+
156
155
if ( options . onFormOpen ) {
157
156
options . onFormOpen ( ) ;
158
157
}
@@ -221,7 +220,6 @@ export function createWidget({
221
220
function closeDialog ( ) : void {
222
221
if ( dialog ) {
223
222
dialog . close ( ) ;
224
- isDialogOpen = false ;
225
223
226
224
if ( options . onFormClose ) {
227
225
options . onFormClose ( ) ;
@@ -245,8 +243,7 @@ export function createWidget({
245
243
*
246
244
*/
247
245
function handleActorClick ( ) : void {
248
- // Open dialog
249
- if ( ! isDialogOpen ) {
246
+ if ( dialog && ! dialog . checkIsOpen ( ) ) {
250
247
openDialog ( ) ;
251
248
}
252
249
You can’t perform that action at this time.
0 commit comments