Addresses GH #3484
As far as I can tell, the popup level checks in this module are
meant to handle nested popups. It seems to me that the goal is
for at most a single hierarchy of popups to exist at any given time
- bearing that in mind, this change checks any popups currently tracked
by the module, canceling any that don't share an element hierarchy with
the new popup.
* make triggerPopup optionally set state directly
* update button widget for new state attributes
* update reveal widget for new state attributes
* fix errors in button widget
Cecily and Zoomin story views use a document.body that is smaller than
the document.documentElement. We were just clearing the popups on
clicks on the document.body Clicks on the document element (ie, on the
background of the page) were not being trapped, meaning that you
couldn’t dismiss a popup.
"Plugins" are bundles of tiddlers managed as one, "modules" are
JavaScript tiddlers with a module type identifying when and how they
should be executed.