Page MenuHomePhabricator

Drag-and-drop doesn't work for the new search bar
Closed, ResolvedPublic

Description

Author: llampak

Description:
With the old search bar it was possible to drag and drop any word from an article on wiki to the search bar. Quite useful.

With the new search bar it's impossible. The word will be dragged to that gray label and disappear when it's clicked.


Version: unspecified
Severity: minor

Details

Reference
bz24723

Event Timeline

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

Hm... Seems to be a problem with Firefox (AFAIK text drag and copy works in FF only anyway). The problem is that Firefox doesn't seem to fire any change/paste and such events after copying the text (including DOMAttrModified) which seems like a bug, but then again it does fire drag and drop events.

The text in the search input is changed between dragleave and drop events and so this seems to work fine for FF:
run onload/ready
var $input = $j('#searchInput');
$input.bind('dragleave', function()
{
var $input = $j(this);
$input.trigger('focus');
if ( $input.hasClass( 'placeholder' ) ) {

		$input.val( '' ).removeClass( 'placeholder' );

}
}, false);

Again, only tested on FF.

  • This bug has been marked as a duplicate of bug 24498 ***