Issue about keyboard shortcuts 'CTRL + F '

Posted by: thinh.nguyen on 6 April 2023, 4:03 am EST

  • Posted 6 April 2023, 4:03 am EST - Updated 6 April 2023, 4:10 am EST

    Currently, I am using SpreadJS version 16.0.5,

    I am having an issue with keyboard shortcuts 'CTRL + F ',

    I want to show a search popup of the browser when I ’ CTRL + F ’ but can’t.

    I have checked then see have an event of ‘spreadjs’ blocked keyboard shortcuts 'CTRL + F ',

    have a way to remove event this?

  • Posted 10 April 2023, 1:32 pm EST

    Hi,

    It seems like you want to disable the “Find” Dialog which is being shown when the user presses “Ctrl+F”. You could handle the “keydown” event, check for the “Ctrl+F” keys and then stop the event propagation further.

    This will open the default Search box of the browser. Kindly refer to the following code snippet and the following sample:

    document.addEventListener("keydown", (e) => {
        if (e.key === "f" && e.ctrlKey) {
            e.stopPropagation();
        }
    });

    Sample: https://jscodemine.grapecity.com/share/xQ_z4bChFkqBMfTP96bUtA/?defaultOpen={"OpenedFileName"%3A["%2Findex.html"%2C"%2Fsrc%2Fapp.js"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}

    Please let me know if you have a different requirement or if you face any issues.

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels