This topic contains 3 replies, has 2 voices, and was last updated by Sean Sean 2 years, 5 months ago.

Overlay buttons don't lose focus


  • salageanandrey
    Participant

    Posts: 2
    Member Reply #5886

    Hi there,

    I’ve created some mt-element-overlay from admin 2  (http://www.keenthemes.com/preview/metronic/theme/admin_2/elements_overlay.html) and on click on the icons I’m opening a modal. After I close the modal, the focus still remains on the button.

    How can I remove the focus from the anchor? I’ve tried with blur but no success. Please give me a technical solution.

    Thanks,

    Andrei

     

    http://screencast.com/t/9KfSEZi3Dw

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #5891

    Hi :),

    Did you try to call blur for the buttons on modal hidden:

    $(‘#myModal’).on(‘hidden.bs.modal’, function (e) {

    $(‘.my-buttons’).blur();

    })

    If you need any further clarifications please let us know.

    Thanks.


    salageanandrey
    Participant

    Posts: 2
    Member Reply #5961

    Hello Sean,

    I’ve tried that (exactly like you) but it did not solve my problem.  Do you have any other suggestions ?

    Thanks,

    Andrei

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #5973

    Hi,

    Can you double check your code ? Is the above event fired and $(‘.my-buttons’).blur(); code executed ? Is it referring to the proper buttons ? You can put console.log(‘some info’) within your JS code to track the code execution by seeing the browser console log right in the console panel.

    Thanks.

Tagged: 

You must be logged in to reply to this topic.