User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Following link always works, but onclick="return false" should prevent this. <a href="test3.html" onclick="return false">click me 3</a> Following link always displays the "are you sure?" dialog, but reloads the page BEFORE displaying the dialog. <a onclick="return confirm('are you sure?');" href="same_page.html">refresh page</a> Following link never displays the "are you sure?" dialog, and just loads other_page.html. <a onclick="return confirm('are you sure?');" href="other_page.html">new page</a> Following form works fine, correctly asking for confirmation, and only submitting the form if the user clicks "OK". <form action="same_or_different_page.html"> <input type="submit" onclick="return confirm('sure?');" /> </form> Reproducible: Always Steps to Reproduce: 1. Create a file with the above links in. 2. Click the links. Actual Results: The onclick action only runs if the link links to the same page, and even then, it only runs AFTER the page has reloaded. However, other firefox users have not confirmed this behaviour. Expected Results: It should display a dialog asking "are you sure?" and only load the link href if the user clicks "OK", NOT if the user clicks "cancel", and DEFINITELY NOT before the user has clicked anything at all. Possibly a dup of: https://bugzilla.mozilla.org/show_bug.cgi?id=64395 though I think maybe that guy was having a different but similar issue. I only marked this as "normal", since although a major feature is broken (the whole "are you sure?" thing is pretty important for userfriendly websites, imho), nobody else appears able to reproduce it. about:buildconfig Build platform target i686-pc-cygwin Build tools Compiler Version Compiler flags $(CYGWIN_WRAPPER) cl 12.00.8804 -TC -nologo -W3 -nologo -Gy -Fd$(PDBFILE) $(CYGWIN_WRAPPER) cl 12.00.8804 -TP -nologo -W3 -nologo -Gy -Fd$(PDBFILE) Configure arguments --disable-ldap --disable-mailnews --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth --enable-crypto --disable-composer --enable-single-profile --disable-profilesharing --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-official-branding
Not a JS engine bug in any case. Probably evang, but throwing to DOM level 0 for now. /be
Assignee: general → general
wfm in ff 1.0, a trunk ff from 20050204, mozilla 1.7.3, 1.7.6 from 20050205
Worksforme as well. Marking so, but please reopen if you can reproduce this in a current trunk build.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.