Work around dialogs opening on top of CopyableLabels

If the browser has loaded the Flash plugin and used it to display
the CopyableLabel widget from our package it may run into problems
with dialogs displaying over the plugin contet; in many cases the
plugin will draw over the dialog, creating a mashed display that
is not what the designer intended the user to see.

A workaround for Firefox and Chrome is to mark all of the embeds
as visibility=hidden for the duration of the dialog box, and put
them back to their prior visibility setting when the dialog is
dismissed.  By marking them hidden the browser won't dispatch a
paint event to the plugins, and the dialog can draw over them.

Using visibility=hidden is preferred over display=none as it does
not cause the page to relayout when the plugin shows/hides.  This
takes less time for the browser to update the UI when showing or
hiding the dialog, and has less visual impact to the user.  It is
also necessary to work around an apparent bug in WebKit (seen on
both Safari and Chrome) where sometimes the plugin's style was
set to display=block instead of display=inline, causing it to no
longer layout with its siblings the same way.

Signed-off-by: Shawn O. Pearce <sop@google.com>
5 files changed
tree: 68803971ec74ebb77fed6cdcb96591ac87e0cb77
  1. .settings/
  2. src/
  3. .gitignore
  4. COPYING
  5. pom.xml