I have a web application where users can edit their profile information. This is presented as a normal web form with input fields containing the existing values:
<form action="<snipped>" method="post" accept-charset="UTF-8" id="frmEditUser">
<fieldset>
<p>
<label for="username">Username</label>
<input type="text" name="username" id="username" value="<?= $uname ?>" size="30" title="must be unique" size="30" />
<label for="username" generated="true" class="error">*<?= form_error('username'); ?></label>
</p>
</fieldset>
</form>
There are more fields, but this simplified markup shows that I am doing nothing out of the ordinary. In both Safari and Chrome (on Windows 7) I am getting some very strange behavior when trying to select existing values in these fields:
When I select from left to right, the selected text is highlighted as expected. When I place my cursor at the end of the field and select from right to left, upon releasing the mouse button the selection is undone and the cursor sits at the end of the field again.
This problem occurs at all input fields and textareas of my application, but only in Safari and Chrome. I thought it might be a javascript problem, but the problem persists when disabling all javascript. Disabling all CSS makes the problem go away.
So the problem is in my CSS. I disabled all CSS rules that have anything to do with forms or form elements, but the problem still remains.
I was hoping there is this odd chance that somebody else encountered the same issue?
Update: The problem is even more fine-grained. It seems to only occur if I select from right to left and in this process of hovering exit the field on the left edge. Not exit as in clicking outside, exit as in hovering out of it whilst still holding the mouse button for the sake of selection.
Update II: I discovered the root of the issue. It happens when selecting from right to left and in this selection process exit the form element, not the field. I added a red border around the form element. As soon as I exit it on the left side, the selection I made is gone. If I add padding to the form element on the left, it shows that the selection remains as long as I stay inside the form element.
Still a bizarre issue that I would like to solve :(
I read your question and decided to check my site in chrome and found the same issue. Go to my site www.futurekode.com and go down to the contact form and enter your name and email and try selecting the text.
On mine, it only happens to the second input field (the email one) and not the textarea either.
I found that adding display:block to the input field fixes it in chrome but not safari :/
Very weird
Related
The question consists of two parts:
Is it ok (from the UX/UI p.o.v.) to make a search box on the page activated on the first tab keypress?
How to do it technically keeping the rest of the tabbing mechanism intact (e.g. the first element activated on tab keypress by default is now activated right after the search box on the second tab keypress)?
For the desktop browsers it okay. But bad UX for the mobile browser as it will popup the keyboard focus automatically comes to search box.
Set attribute tabindex="0" for the elements programmatically using JavaScript after the the search box leaves focus. Use onblur() event.
You can use tabindex=1 attribute in your search input element to achieve. Like this,
<input type="text" placeholder="Search here" tabindex="1" />
Whether you should or not, This article might help
Whenever I add a widget under Appearance -> Widgets, all of the items in the form load, and then disappear after a second or two. This is happening for all widgets, and this is what they look like when it happens:
Something is changing all type tags to hidden:
<input type="hidden" ...>
And all of the tags containing text get "display: none" added to them:
<div class="widget-description" style="display: none;">
A calendar of your site’s Posts.
</div>
The widget description class also gets display:none added to them.
However, when I reload the page after adding the widget, the form loads as expected. It only happens when the widget is first added. Has anyone run into this issue?
The issue ended after updating Wordpress to 5.2.2 and above
I've got an jsp page. The page displays a lists of items.
These items can be
- created by clicking a link, which displays a pop up form
- edited by clicking one of the items on the list
In the form, there is a field - compensation, that's either shown or hidden based on the values of other fields.
When a new item is created, I want compensation to always be hidden.
But the problem is that depending on the state of that (compensation) field when the form was last shown, it's either shown, or hidden when the new item link is clicked.
For that field, I have the html/css as follows:
<tr id="compensation" style="display: none;"><td></td></tr>
(and then logic hides and shows the field as needed)
How can I always hide that field?
If you want the form field to always remain hidden, use:
<input type="hidden" name="compensation" value="<%= compensation %>" />
In my asp.net webform page I have a simple form with a single inputfield and a submit button. When initiating the post request and then hover over the submit button, the browser stops showing the loading state (progress bar dissapears, the "Done" label appears and the loading animation in the tab becomes the site icon again.
I have been able to narrow the bug down to the followihg css rule:
.button:hover {
background-image:url("/content/images/buttonHoverGradient.jpg");
}
on the following html
<input type="submit" class="button" title="Select a provider" value="Select">
It seems to me IE initiates the request to fetch the image and then takes the status of this new request as the overal status. I don't have a clue how to prove this. Any ideas?
UPDATE
The buttons class is used all over the page and we cannot know the dimensions of them on beforehand. Therefore using a single background as suggested by #teresko image with several states embedded is not an option.
UPDATE
It seems to be in other versions of IE too. Some research seems to point to the Doctype (which is currently quircks as asp.net webforms 3.5 doesn't really alow for strict)
Did you try to just use a same image for both normal and :hover state of the button , and only change the position of image on mouseover? Kinda like in this example.
This should solve at least part of the problem.
(Edited the question's focus due to some more investigation)
I have a simple page with a gridview inside an update panel. When I click the column header to sort, the postback fires and the sorting works, but a blank space appears at the top of the page, pushing everything down.
If I remove the UpdatePanel, things work fine and no blank space appears.
It doesn't happen in Firefox/Chrome, I only see the issue in IE 7 (or IE8/9 when Compatibility Mode is set to IE7 Standards).
So I'm wondering how to get around this, since users could still be using IE7 or have Compatibility mode on (quite a large and diverse user base on this system.) in a newer version of IE.
All I can see is that, on the async postback, this is added to the top of the form (first element in asp.net main form):
<DIV>
<INPUT id="ctl00_ScriptManager1_HiddenField" type="hidden" name="ctl00_ScriptManager1_HiddenField" value="" />
</DIV>
(IE tool is capitalizing)
I tried styling that input field but it didn't make a difference.
It's not a huge deal, but, if the UpdatePanel doesn't work properly, it makes me wonder what else will break in Compat Mode.
Thanks
This is old but to all who are interested... Set the rendering mode of the update panel to inline. This can happen when you have empty update panels.