[Webkit-unassigned] [Bug 52372] history.go(-3) goes to a wrong page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 16:08:24 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52372


Joe Wild <joseph.wild at nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joseph.wild at nokia.com




--- Comment #5 from Joe Wild <joseph.wild at nokia.com>  2011-02-23 16:08:24 PST ---
52372 Maj P3 All webkit-unassigned at lists.web...  NEW history.go(-3)
goes to a wrong page

I think this is a problem with the test case.  The <a> on page 8th
page (go_n8.html) has an href and an onClick handler.  The link is
handled after the onClick event.  It pushes another entry onto the
stack, "go_n8.html#" which then causes the go(-3) to be off by 1 and
go back to the 6th page instead of the 5th.

  http://testsuite.nokia-boston.com/content/esmp_Sec9/objHistory/go_n8.html#
  function fMain(){
    history.go(-3);
  }
  <p>
    <a href="#" onClick="fMain()">Go to Page-5</a>
  </p>

If I change the test case make the onclick event return false, the
elements default action (loading the href) is not executed, and
everything works as expected.

  <p>
    <a href="#" onClick="fMain(); return false;">Go to Page-5</a>
  </p>

I think this should be ignored.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list