Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion #4

Open
oranage-ninja-guy opened this issue Nov 23, 2013 · 2 comments
Open

Suggestion #4

oranage-ninja-guy opened this issue Nov 23, 2013 · 2 comments

Comments

@oranage-ninja-guy
Copy link

The wrapper div put around the input element can break layouts that depend on the input staying as inline. Suggest adding 'inline-block' to the style declaration on the wrapper div. This seems to work for my particular instance.

diff:

[sdavied@linuxweb js]$ svn diff jquery-clearsearch.js
Index: jquery-clearsearch.js
===================================================================
--- jquery-clearsearch.js       (revision 359)
+++ jquery-clearsearch.js       (working copy)
@@ -43,7 +43,7 @@
                                                divClass = settings.clearClass + '_div';

                                        if (!$this.parent().hasClass(divClass)) {
-                                               $this.wrap('<div style="position: relative;" class="'
+                                               $this.wrap('<div style="display: inline-block; position: relative;" class="'
                                                        + divClass + '">' + $this.html() + '</div>');
                                                $this.after('<a style="position: absolute; cursor: pointer;" class="'
                                                        + settings.clearClass + '">' + settings.linkText + '</a>');

Edit: posted the correct diff (old one applied to the anchor rather than div - oversight on my part)

@Daijobou
Copy link

+1

1 similar comment
@horacioj
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants