Homestyx hydra
Diffusion hydra 9f44ee393343

Use "link.getAttribute('href')", not "link.href", to bypass dark browser magic

Description

Use "link.getAttribute('href')", not "link.href", to bypass dark browser magic

Summary:
Ref T13302. In at least some browsers (including Safari and Chrome), when you write this:

<a href="#">...</a>

...and then access <that node>.href, you get http://local-domain-whatever.com/path/to/current/page# back.

This is wonderful, but not what we want. Access the raw attribute value instead, which is # in all browsers.

Test Plan:

  • In Safari, Chrome, and Firefox:
  • Clicked "Edit Subtasks" from a task.
  • Clicked "Select" buttons to select several tasks.
  • Before: Clicking these button incorrectly closed the dialog (because of D20573).
  • After: Clicking these buttons now selects tasks without closing the dialog.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13302

Differential Revision: https://secure.phabricator.com/D20590

Details

Provenance
epriestleyAuthored on Jun 19 2019, 1:19 PM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:5d8ee504d645: Replace weird, redundant list of branches in Diffusion "Manage" UI with a link…
Branches
Unknown
Tags
Unknown

Event Timeline