Skip to content

Badly positioned password field which is dynamically shown #212

Open
dsgh opened this Issue Apr 30, 2012 · 0 comments

1 participant

@dsgh
dsgh commented Apr 30, 2012

This bug is visible when using one of the placeholder support plugins: mathiasbynens/jquery-placeholder

The plugin hides the true password input and shows a different 'fake' password input. When you tab into it, the 'fake' password input is hidden, and the real one is shown.

If the inputs are styled with rounded borders, then the true password input is sometimes rendered with the wrong coordinates (0, 0).

Here's a posible fix, against 1.0beta5. Not sure if still applies in master:

diff --git a/sources/RootRenderer.js b/sources/RootRenderer.js
index 883ad78..432edf5 100644
--- a/sources/RootRenderer.js
+++ b/sources/RootRenderer.js
@@ -60,7 +60,8 @@ PIE.RootRenderer = PIE.RendererBase.newRenderer( {
             s.left = x;
             s.top = y;
             s.zIndex = tgtPos === 'static' ? -1 : tgtCS.zIndex;
-            this.isPositioned = true;
+            var vis = this.styleInfos.visibilityInfo.getProps();
+            this.isPositioned = vis.visible && vis.displayed;
         }
     },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.