Undocumented property dd-triggerrepaint for drag and drop

VERIFIED WONTFIX

Status

()

Core
XUL
VERIFIED WONTFIX
17 years ago
10 years ago

People

(Reporter: Michael Brannigan, Assigned: David Hyatt)

Tracking

Trunk
mozilla0.9.7
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
BuildID:    20010717

Drag and Drop tree sort separators draw poorly without use of the undocumented 
dd-triggerrepaint property.

Any style-modifying code in the ondragover() handler, even if there will be no 
resultant change in the display (ie, setting an already-white background color 
to white), will cause tree sort separators to draw erratically, flickering or 
not cleaning up properly (leaving separator "trails"). Due to the trails, 
sortseparator functionality is compromised.

Reproducible: Always
Steps to Reproduce:
In a dragover observer for a tree widget, include code akin to this:

  onDragOver: function (evt,flavour,session){
       evt.target.setAttribute("style","background-color: white;");
  }



Actual Results:  Lace up the observers where appropriate, and you'll find drag 
functionality is drawn poorly as described above. 

Expected Results:  Sort separator functionality similar to the bookmarks manager




Workaround:

Adding two lines to the ondragover() handler solves this problem. 

Using the XULPlanet tutorial 
(http://www.xulplanet.com/tutorials/xultu/dragex.html), the resulting observer 
code would look like this:

Example 8.7.2:

var listObserver = { 
  onDragStart: function (evt,transferData,action){
    var txt=evt.target.getAttribute("elem");
    transferData.data=new TransferData();
    transferData.data.addDataForFlavour("text/unicode",txt);
  }
};

var boardObserver = {
  getSupportedFlavours : function () {
    var flavours = new FlavourSet();
    flavours.appendFlavour("text/unicode");
    return flavours;
  },

  onDragOver: function (evt,flavour,session) {
/*++*/       var treeItem = evt.target.parentNode.parentNode;    // get the 
treeitem that contains the cell that was dragged over
/*++*/	treeItem.setAttribute ("dd-triggerrepaint", 1 );         // repaint it
  },

  onDrop: function (evt,dropdata,session){
    if (dropdata.data!=""){
      var elem=document.createElement(dropdata.data);
      evt.target.appendChild(elem);
      elem.setAttribute("left",""+evt.pageX);
      elem.setAttribute("top",""+evt.pageY);
      elem.setAttribute("label",dropdata.data);
    }
  }
};

Updated

17 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7

Comment 1

17 years ago
What is the real defect here? Steps to reproduce?  (in plain English, please)

Comment 2

17 years ago
Not fixing tree bugs like this anymore.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WONTFIX

Comment 3

17 years ago
Oh, just trees? verified wontfix
Status: RESOLVED → VERIFIED

Updated

10 years ago
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.