Make middle or control-clicking on dashboard cells work properly.

Review Request #6011 — Created June 19, 2014 and submitted

Information

Djblets
release-0.8.x
714804d...

Reviewers

Dashboard cells with links had a long-standing bug where if you middle or
control-clicked on the link, it would open it in a new page, but if you middle
clicked on the row, it wouldn't. This was doubly confusing because a plain left
click on the cell would open the link as intended.

The issue here was that clicks inside the cell were handled via javascript.
After trying unsuccessfully to imitate a middle click event dispatch, I've
stripped out the javascript handling and just stuck a <div> element inside the
<a>. This causes the link to expand to the width of the cell.

Tested with various different dashboard configurations. All links that are done
via the cells (review request summaries, usernames) span the full width of the
cell, and work properly even when the text is wrapped. Other cells are
unaffected.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        djblets/datagrid/templates/datagrid/cell.html
        djblets/static/djblets/js/datagrid.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        djblets/datagrid/templates/datagrid/cell.html
        djblets/static/djblets/js/datagrid.js
    
    
  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (5dcd34e)