azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

submit question button is disabled

Open cforce opened this issue 1 year ago • 2 comments

The Submit question button "mouse over is disabled" -always . No matter with or without text. It still works with Return key to send a message Using latest Chrome

cforce avatar Oct 23 '24 07:10 cforce

I'm unable to replicate this, here's what I see in Edge: Screenshot 2024-10-25 at 4 02 41 PM

Is this with user login enabled or other features?

pamelafox avatar Oct 25 '24 23:10 pamelafox

AZURE_USE_AUTHENTICATION="true" AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS="true" AZURE_ENABLE_UNAUTHENTICATED_ACCESS="false" AZURE_ENFORCE_ACCESS_CONTROL="true"

/auth_setup -> "enableUnauthenticatedAccess":false, "useLogin":true, "requireAccessControl":true

export const requireLogin = requireAccessControl && !enableUnauthenticatedAccess;

const disableRequiredAccessControl = requireLogin && !loggedIn; const sendQuestionDisabled = disabled || !question.trim() || requireLogin;

For me it look like the button is always disabled when requireLogin is true. That does not make sense when i am logged in already

Maybe it shall be better

const sendQuestionDisabled = disabled || !question.trim() || disableRequiredAccessControl;

cforce avatar Oct 25 '24 23:10 cforce

This doesn't seem logical. @pamelafox, should I create a quick fix with a PR?

jeannotdamoiseaux avatar Nov 26 '24 10:11 jeannotdamoiseaux

Yes please, thank you @jeannotdamoiseaux

pamelafox avatar Nov 26 '24 16:11 pamelafox