Keep focus while opening modal

6 posts, 0 answers
  1. Jhony
    Jhony avatar
    16 posts
    Member since:
    May 2016

    Posted 06 Jul 2017 Link to this post

    Hello,

    I need to open a modal when the user clicks on an editable cell.

    I added in the cell template editable a button that opens a modal, but when it opens soon it closes.

    Is there any way to keep the field editable while the modal is open?

  2. Preslav
    Admin
    Preslav avatar
    583 posts

    Posted 10 Jul 2017 Link to this post

    Hello Jhony,

    Based on the provided information, I am not sure what is the exact scenario of the project. Thus, please excuse me if something below is not on the topic.

    I assume that after opening a modal window, the edited cell looses focus and is no longer editable. Correct me if I am wrong.

    To overcome this, you could detect the closing window event. In the event handler, manually edit the cell by invoking the editCell grid method:
    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jhony
    Jhony avatar
    16 posts
    Member since:
    May 2016

    Posted 14 Jul 2017 in reply to Preslav Link to this post

    Hi, good morning!
    We are trying to play a grid component with an editable cell plus a zoom into the same cell.
    When I click in the cell the zoom button was shown, the problem is, when I take mouse cursor off the editable cell to click the zoom button, the modal of the zoom open and close very quickly as you can see in the gif example that I'm sending an attachment.
    And I don't know how to fix this it.

    Thank you for your attencion.
  4. Preslav
    Admin
    Preslav avatar
    583 posts

    Posted 17 Jul 2017 Link to this post

    Hello Jhony,

    Thank you for elaborating on the issue. However, I am still not able to understand what is the exact problem.

    Could you please tell us, is the problem the fact that the window closes immediately or the fact that once the window closes, the cell is no longer in edit mode? In both cases, please provide a runnable Dojo that will help me fully understand the scenario and provide assistance to the best of my knowledge.

    In the meantime, I believe that you might be interested in checking the "Add Custom Column Popup Editor" article:

    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Jhony
    Jhony avatar
    16 posts
    Member since:
    May 2016

    Posted 18 Jul 2017 in reply to Preslav Link to this post

    The problem is that when I open the modal the editable cell loses focus, this closes the modal. I want the modal to remain open, so for this I want to keep the cell editable when opening the modal. Is there any way?
  6. Preslav
    Admin
    Preslav avatar
    583 posts

    Posted 20 Jul 2017 Link to this post

    Hi Jhony,

    Thank you for the elaboration once again. I believe that I was able to fully understand the scenario.

    The only possible solution might be using inline editing mode. That way, the cell will not close once it looses focus.

    I hope this information helps.


    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top