1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Partial Fix Spoiler Tooltip Appears When Spoiler Is Open And Browser Tabs Are Switched

Discussion in 'Resolved Bug Reports' started by Divvens, Jan 23, 2014.

  1. Divvens

    Divvens Well-Known Member

    As the title says, spoiler tooltip remains visible ("Click to reveal or hide spoilers") in Chrome (tested in chrome) when a spoiler is open and you visit another tab and return to the original tab.

    Steps to reproduce:
    • Visit this testing thread - http://xenforo.com/community/threads/testing-spoiler-bug.67278/
    • Open spoiler tag and do not click on any other part of the page. Keep the spoiler tab open.
    • Click on a open tab/open a new tab in the browser.
    • Return back to testing thread tab, you will see the tooltip visible.
    • Click on any part of the page to remove the tooltip.
     
  2. mjda

    mjda Active Member

    Confirmed in Chrome and FireFox using Win7.
     
    Divvens likes this.
  3. Amaury

    Amaury Well-Known Member

    Confirmed, though it may be as designed.
     
    Divvens likes this.
  4. mjda

    mjda Active Member

    I wouldn't think so. Why, if none of the other tooltips work that way, would you think that one is as designed?
     
    Divvens likes this.
  5. Nobita.Kun

    Nobita.Kun Well-Known Member

    Confirmed in Chrome using Windows 8.1 :)
     
    Divvens likes this.
  6. Divvens

    Divvens Well-Known Member

    Indeed, that is why I reported this as a bug since this isn't a normal behavior with the other tooltips and it felt odd.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    The reason is the button stays focussed after clicking it.
    So I guess it needs to have the focus removed.
     
  8. Mike

    Mike XenForo Developer Staff Member

    This can possibly happen elsewhere. What happens is that clicking the button focuses it. When you click to another tab, blur is fired (which would hide the tooltip); when you come back, the browser fires focus again. That necessitates showing the tooltip again -- this is the correct behavior for focus being fired. (It's important to allow tooltips to work with keyboard navigation.)

    So the only option is really to prevent the focus. We don't want to do that generally because it will destroy keyboard navigation with the spoilers. So I'm just immediately calling blur when the spoiler button is clicked with a mouse (or mouse-like thing). Of course, this hides the tooltip when clicking, but there isn't really a generic way around that.
     
    mjda and Divvens like this.

Share This Page