Focus blocked in Filerobot Image Editor within a Modal

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1829

    #1

    Focus blocked in Filerobot Image Editor within a Modal

    Hi everyone,

    I am integrating the Filerobot Image Editor (Vanilla JS version) into a custom modal view in EspoCRM.

    The Problem: When the editor's "Save" dialog opens, I cannot type into any input fields (e.g., Image Quality, Dimensions). It seems like the EspoCRM Modal (Bootstrap) is stealing the focus or enforcing a focus trap that prevents typing in third-party library inputs.

    What I've tried so far:
    1. Disabling _enforceFocus on the bootstrap modal: $(window).off('focusin.bs.modal').
    2. Removing the tabindex attribute from the modal element: this.$el.closest('.modal').removeAttr('tabindex').
    3. Using e.stopPropagation() on keyboard events within the view.
    4. Configuring Filerobot to use a local container for popups (getPopupContainer) so the inputs stay within the modal's DOM tree.

    Observations:
    • If I run the editor in a standalone HTML page (outside Espo), it works perfectly.
    • Inside the Espo Modal, I can click the inputs, but keyboard events are ignored.

    Question: Is there a specific EspoCRM mechanism or a global event listener that enforces focus within Modals? How can I white-list these external inputs or temporarily disable the focus trap while the editor is active?

    Thanks for any insights!
Working...