This happens due to a bug in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=85686). Maybe use other methods to check if any input/textarea has focus and then get selection from it.
This happens due to a bug in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=85686).
Maybe use other methods to check if any input/textarea has focus and then get selection from it.