Open Bug 493416 Opened 13 years ago Updated 3 years ago
onclick event not triggered - text input - after onfocus value change
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:22.214.171.124) Gecko/2009042316 Firefox/3.0.10 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/2009042316 Firefox/3.0.10 Text input onclick event is not triggered for clicks on the text which is cleared/modified using onfocus handler (it is triggered however, for clicks on the right of that text, or if value does not change). Reproducible: Always Steps to Reproduce: 1. Open attached page 2. Click on the text in the box Actual Results: Counter not changed Expected Results: Counter should increment
Component: General → Event Handling
Product: Firefox → Core
QA Contact: general → events
Version: unspecified → 1.9.0 Branch
Have the same problem in Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:188.8.131.52) Gecko/20100401 Firefox/3.6.3 My test shows exactly the same http://jsbin.com/evebe3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 still has the same problem with my test: If field is not focused, you click on the text in the field and that text is changing on focus, the click listener is not executed. If you however click in the blank part of the field then the click listner is excuted. For click listener to be executed, now you may also click on "to be blank" part of the field. I believe this is new behavior (Firefox 4) Test by j.alkjaer does not show the problem, because it clears the text entirely.
Version: 1.9.0 Branch → 2.0 Branch
I do not reproduce the reported issue with the attachment provided by guntiso and with my current version of Firefox 31.0, I believe this was fixed? However I reproduce a very similar issue when instead of changing the value, I remove the placeholder attribute of the input. C.f. attachment. When clicking the first time on the input, the counter is not incremented. When clicking a second time (or more), it is incremented. This happens whether clicking on the text or outside of it.
Reproduces in Firefox 37.0.2 with following jsfiddles: - http://jsfiddle.net/ms4tmw3x/3/ - placeholder of input is changed in focus event handler - http://jsfiddle.net/ms4tmw3x/4/ - style of focused input is changed via CSS
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.