Page MenuHomePhabricator

Javascript fallback 'href' for Watch-link / Watch-star isnt updated when page is (un)watched via javascript
Closed, ResolvedPublic

Description

When javascript is enabled and one clicks the Watch-link or Watch-star the href-attribute of the anchor-tag isnt updated from action=watch to action=unwatch.


Version: 1.16.x
Severity: enhancement

Details

Reference
bz26305

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:20 PM
bzimport set Reference to bz26305.

Although it's not a very common usecase that javascript support would fail after the page has been watched or unwatched with javascript, this was intented to be supported in skins/common/ajaxwatch.js by the following line:
<pre>

  • $link.attr( 'href', $link.attr( 'href' ).replace( '/&action=' + action + '/', '&action=' + otheraction ) );

</pre>
However.. I guess this is a left-over from a regex or something becuase that doesn't do anything. Those slashes are within the single-quotes and, since those arent in the link, match nothing.

Changing version to 1.16.0, confirmed in that version as well.
Perhaps backport this one to 1.17 (perhaps also to 1.16)