clockface icon indicating copy to clipboard operation
clockface copied to clipboard

Multiple clockfaces each with button doesn't close other when button is clicked

Open johntrepreneur opened this issue 11 years ago • 0 comments

When you have multiple clockfaces on a page (i.e. startTime & endTime) each with it's own button to toggle show/hide (like in example), the functionality to hide other "non-active" clockfaces doesn't work. This is because, in the clockface "button" example, it suggests using stopPropogation() in the click event for the button, but if you do that, then the clockface.js code that relies on registered click events elsewhere in the document to get fired in order to close other clockfaces, doesn't happen.

To fix this, isn't it possible to just use jquery .blur or .focusout on the clockface instead of listening to click events elsewhere? Just a thought.

johntrepreneur avatar May 22 '14 17:05 johntrepreneur