Skip to main content

Search and Top Navigation

#6049 closed bug (worksforme)

Opened September 14, 2010 12:17PM UTC

Closed November 08, 2012 12:56AM UTC

Link in sortable (portlets) - IE8

Reported by: raziel057 Owned by:
Priority: major Milestone: 2.0.0
Component: ui.sortable Version: 1.8.4
Keywords: IE8 Cc:
Blocked by: Blocking:
Description

If you try to add a link in the content of one portlet on the sample page: http://jqueryui.com/demos/sortable/portlets.html

With IE8, try to move the box which contains the link in the same column (on the top or bottom an other box) and try to click on the link after that. When you click on the link for the first time, it doesn't react.

Attachments (2)
  • simpletest.html (2.9 KB) - added by raziel057 September 14, 2010 12:19PM UTC.

    Llink inside a portlet

  • simpletest2.html (1.0 KB) - added by raziel057 September 14, 2010 02:35PM UTC.

    More simple test

Change History (5)

Changed September 14, 2010 02:39PM UTC by raziel057 comment:1

The problem exists with a simple sortable list too.

It seems to come from an event handler which applies on links an is executed before href property.

The event is apply when eleemnt is dragged.

Changed September 15, 2010 07:49AM UTC by raziel057 comment:2

If add the following code In widget ui.mouse, _mouseInit function the problem is solved!(see http://dev.jqueryui.com/ticket/4773)

// Prevent click on links in IE
if ($.browser.msie) {
	this._mouseUnselectable = this.element.attr('unselectable');
		this.element.attr('unselectable', 'on');
	}

Here the modified _mouseInit function:

_mouseInit: function() {
	var self = this;

	this.element
		.bind('mousedown.'+this.widgetName, function(event) {
			return self._mouseDown(event);
		})
		.bind('click.'+this.widgetName, function(event) {
			if(self._preventClickEvent) {
					
				// Prevent text selection in IE
				if ($.browser.msie) {
					this._mouseUnselectable = this.element.attr('unselectable');
						this.element.attr('unselectable', 'on');
				}
					
				self._preventClickEvent = false;
				event.stopImmediatePropagation();
				return false;
			}
		});
		this.started = false;
	},

Could you please review the modification and add the patch for a next version of jquery ui?

Thanks

Changed September 15, 2010 08:15AM UTC by raziel057 comment:3

As a workarround (without modification in widget ui=mouse, I add unbind instrtuction in simpletest2.html

$(function() {
	$("#sortable")
		.sortable()
		.unbind('click.sortable');
	});

But I must be a temporary solution.

Changed October 03, 2012 04:43PM UTC by scottgonzalez comment:4

milestone: 1.next2.0.0

Changed November 08, 2012 12:56AM UTC by mikesherov comment:5

resolution: → worksforme
status: newclosed

Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI. http://jsfiddle.net/sfYHu/2/

If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!