Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to restrict Ctrl+S key

Avatar

Former Community Member

Hi All

I have designed editable form in Adobe live designer.Here in a button click i am validating some fields as mandatory. So problem is i need to restrict user to restrict ctrl+s key without fill mandatory field. same way i should allow to user to save by File menu also. Is there any way to do. i found this command to restrict user ctrl+s key event.target.dirty = false; i want to know what is use of this command. Thanks in Advance !!

Regards,

Ganesh

1 Reply

Avatar

Level 10

Hi,

fact is, you can't deactivate the key combination Ctrl + S.

The script event.target.dirty = false; only resets the dirty flag of the file, which indicates if there have been mady any changes.

If it is false, the save button is grayed out in the UI, but you're still able to save the file.