MantisBT - NetSurf
View Issue Details
0002430NetSurfJavascriptpublic2016-02-21 15:542016-03-07 13:37
ReporterChris Young 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformAmigaOSAmigaOSOS Version4.1
Product Version3.4 
Target VersionFixed in Version 
Fixed in CI build #
Reported in CI build #3421
URL of problem pagehttp://www.unsatisfactorysoftware.co.uk/netsurf/onclick.html
Summary0002430: onClick in 'a' tag is ignored
DescriptionWhilst onClick appears to be working for buttons, in 'a' tags the attribute is ignored.
Steps To ReproduceVisit http://www.unsatisfactorysoftware.co.uk/netsurf/onclick.html
Click on the link, which should redirect to the NetSurf homepage.
(I'm not sure if that Javascript works in NetSurf, but there is nothing in the log to suggest it is even firing the event)
Additional InformationThe code is:
#

It is my understanding that the onclick should execute, and if it doesn't return false then the usual href kicks in.
TagsNo tags attached.
Attached Fileslog ns.log (92,347) 2016-02-21 15:54
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=414&type=bug

Notes
(0001331)
Dave Higton   
2016-02-21 20:51   
Curious. The source of the cited URL is tiny. When I open the page and click repeatedly on the link, the throubber does something briefly each time - NS is doing something. The log say "Dispatching 'click' against"... but nowhere in the log does the target URL (netsurf-browser.org) appear. Surely it should appear, at least once, somewhere in the log?

Are we just reloading the page instead of visiting the target?
(0001332)
Dave Higton   
2016-02-21 20:53   
It's not Amiga-specific - my observations in my note above are from RISC OS with CI #3421.
(0001334)
Chris Young   
2016-02-21 21:15   
I think it's following the href and not running the onclick code.

The log does say it is dispatching the click but doesn't then go on to say "Hooray! An event!". So it looks like it isn't registering the onclick from the tag as an event, from the limited amount I understand about this stuff.

It could well be "not yet implemented".

Issue History
2016-02-21 15:54Chris YoungNew Issue
2016-02-21 15:54Chris YoungFile Added: ns.log
2016-02-21 15:55Chris YoungAdditional Information Updatedbug_revision_view_page.php?rev_id=1818#r1818
2016-02-21 18:13Chris YoungSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1820#r1820
2016-02-21 18:13Chris YoungAdditional Information Updatedbug_revision_view_page.php?rev_id=1821#r1821
2016-02-21 20:51Dave HigtonNote Added: 0001331
2016-02-21 20:53Dave HigtonNote Added: 0001332
2016-02-21 21:15Chris YoungNote Added: 0001334
2016-03-07 13:37Vincent SandersStatusnew => acknowledged
2016-03-07 13:37Vincent SandersAdditional Information Updatedbug_revision_view_page.php?rev_id=1839#r1839