Page MenuHomePhabricator

Dragging of the ProveIt window doesn't work with Firefox
Closed, ResolvedPublic

Description

Moving of the window from title bar doesn't work with Firefox. Tested with Firefox 49.0.2 (Ubuntu) and French Wikipedia. With Chromium it worked as expected.

How to replicate the bug

  • Go to https://fr.wikipedia.org
  • Log in
  • Enable ProveIt from the gadgets
  • Go to page Pargas and start to edit it
  • Expand ProveIt window
  • Try to move the ProveIt window from bottom of the page

Event Timeline

Iniquity triaged this task as Medium priority.Nov 11 2016, 3:31 PM
Iniquity moved this task from Backlog to Bug reports on the ProveIt-Gadget board.

This is caused here:


		mw.loader.using( 'jquery.ui.draggable' ).then( function () {
			gui.draggable({
				handle: header,
				containment: 'window',
				start: function ( event ) {
					if ( event.toElement.id !== 'proveit-header' ) {
						dragged = true;
					}
					gui.css({
						'right': 'auto',
						'bottom': 'auto'
					});
				}
			});
		});

event.toElement is undefined in Firefox. The intention of the code is to prevent clicks on any of the buttons in the #proveit-header right after a drag has occurred. event.toElement.id can be replaced with event.originalEvent.target.id, and it works for me in Chromium 57 and Firefox 54. event.originalEvent is the original jQuery mousedown event; .target then gets the element which was actually clicked.

Sophivorus assigned this task to Uglemat.