Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Badly positioned password field which is dynamically shown #212

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

Badly positioned password field which is dynamically shown #212

dsgh opened this issue Apr 30, 2012 · 0 comments

Comments

@dsgh
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant