You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modal controlled by 'svg' element, when closing gets "no method 'focus'" error from 'restoreLastFocus()' #917
I still don't really have enough info here...the original error posted is of the bootstrap controlled div not having a focus method, which is really odd b/c divs have focus methods. @oosthoek I am not sure where svg is coming from the modal doesn't render any svg elements, so you might be having a different error.
I'm sorry I'll be more specific. I have a svg element and when you click on it it opens a modal. when i try to close the modal i get the error from above which is from the restoreLastFocus function in Modal.js. this function calls .focus() on the element that had the focus before hand. I was able to temporarily fix this problem by setting the focus to a non svg element before i open the modal.
changed the title [-]Modal has no method 'focus'[/-][+]Modal controlled by 'svg' element, when closing gets "no method 'focus'" error from 'restoreLastFocus()'[/+]on Jul 11, 2015
Activity
[-]Modal has no method '[/-][+]Modal has no method 'focus'[/+]jquense commentedon Jun 29, 2015
Hi here,
can you provide a bit more context here for what you are doing and what the code looks like that triggers this error?
oosthoek commentedon Jul 9, 2015
Hello,
I also have this same error. i am using IE11, which does not support .focus() on svg elements.
jquense commentedon Jul 9, 2015
I still don't really have enough info here...the original error posted is of the bootstrap controlled div not having a focus method, which is really odd b/c divs have focus methods. @oosthoek I am not sure where svg is coming from the modal doesn't render any svg elements, so you might be having a different error.
oosthoek commentedon Jul 9, 2015
I'm sorry I'll be more specific. I have a svg element and when you click on it it opens a modal. when i try to close the modal i get the error from above which is from the restoreLastFocus function in Modal.js. this function calls .focus() on the element that had the focus before hand. I was able to temporarily fix this problem by setting the focus to a non svg element before i open the modal.
Hope that was more clear.
jquense commentedon Jul 10, 2015
Ok that makes more sense, definitely a bug.
[-]Modal has no method 'focus'[/-][+]Modal controlled by 'svg' element, when closing gets "no method 'focus'" error from 'restoreLastFocus()'[/+][fixed] ensure last focused item can be focused
[fixed] ensure last focused item can be focused
[fixed] ensure last focused item can be focused