javascript - click-event doesn't fire if blur changes layout -


I have a field in which there are bound to be bound to the required fields. I then have a "cancel" button Which just calls the URL (button has an image with click-event).

When you leave one of the required fields, then a warning is written on the page that area xy is required. -> This causes a layout change, which means that the buttons take a little down because of all the fields and the text given above.

The hard thing is: when the focus is empty but the field is required and you click the cancel button, the required warning is written on the screen, but the click-on-click fire on the cancel button I do not think this layout is due to shift because the mouse cursor is no longer on the button, because the button has been scrolled down.

Is there any good idea how can I solve it?

Warning before changing / blurring events by voting you a setInterval function You can try to display so that until you have already done the 'Cancel' button, the RFU has already happened.

Or, you can hold onmousedown on the button instead of onclick , because before it will become blurred. (It creates such a button, though not expected.)

But perhaps I will try to warn you when this is possible, do not cause the reason for the vaccine, otherwise leave the empty space


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -