Can't trigger find event


I’m trying to trigger the find event externally, but I cant make it work properly. I looked at BpmnKeyboardBindings.js and found this:

  // search labels
  // CTRL + F
  addListener('find', function(context) {

    var event = context.keyEvent;

    if (keyboard.isKey(['f', 'F'], event) && keyboard.isCmd(event)) {

      return true;

I had the idea of using the editorActions in the same way, so i did this function:

  ativarPesquisa(): void {
    const editorActions = this._modelador.get('editorActions');

It works great with other actions, but it cant trigger ‘find’ specifically, and i dont know what else to try.

I’m using angular 11 and bpmn-js@8.8.2 .

Thanks in advance!

Hi @Vitor_Sulzbach, welcome :wave:

Firing the editor action works for me, cf. this Code Sandbox.

Please note that the search pad module has to be present.

const searchPad = modeler.get("searchPad");
console.log("Search pad module:", searchPad);

const editorActions = modeler.get("editorActions");