Custom Query (7259 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (109 - 111 of 7259)

Ticket Resolution Summary Owner Reporter
#8168 notabug Some questions about destroy BenLocke
Description

I am studying jquery ui. I found some questions in it. Hope somebody can give me a response by email:[email protected] Thanks

  1. When the selectable widget has been destroyed, some of the data has not been cleaned.

I use firebug in Firefox to test it. The reason is the destroy function in selectable widget has not cleaned the data of selectableItem instead of selectable-item. And I think the destroy function should try to clean the class ui-selected in selectees.

  1. Maybe the jquery.ui.mouse.js should rewite the functions: _createWidget and destroy. like this:

_createWidget: function( options, element ) {

this._superApply( "_createWidget", arguments ); this._mouseInit();

}, destroy: function() {

this._mouseDestroy(); this._superApply( "destroy", arguments );

},

If rewiting the functions in jquery.ui.mouse.js, the widgets don't need to recall _mouseInit() and _mouseDestroy().

  1. I think the jquery.ui.selectable.js should use function _destroy instead of function destroy. Maybe other widgets should do it like this. If rewriting the function destroy in widget, the logic in original function destroy has been lost. The function destroy calls _destroy and _destroy is a null function. I think rewriting function _destroy in widgets is better.

_destroy: function() {

this.selectees

.removeClass("ui-selectee ui-selected") .removeData("selectableItem");

this.element

.removeClass("ui-selectable ui-selectable-disabled") .removeData("selectable") .unbind(".selectable");

this._mouseDestroy(); return this;

},

destroy: function() {

this.selectees

.removeClass("ui-selectee") .removeData("selectable-item");

this.element

.removeClass("ui-selectable ui-selectable-disabled") .removeData("selectable") .unbind(".selectable");

this._mouseDestroy();

return this;

},

#8359 wontfix Add "beforeOpen" event to Dialog BenVercammen
Description

I would like to have a "beforeOpen" event for the Dialog class. I've already patched jquery.ui.dialog.js like this:

	open: function() {
		if (this._isOpen) { return; }

		var self = this,
			options = self.options,
			uiDialog = self.uiDialog;

+		if (false === self._trigger('beforeOpen')) {
+			return;
+		}
+
		self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
		self._size();
		self._position(options.position);
		uiDialog.show(options.show);
		self.moveToTop(true);

I need this event for the following situation:

  • when opening/closing a Dialog, the "focus" is reset (to adapt to the new elements being visible/hidden)
  • this means that you lose focus after closing a dialog and have to start "tabbing" again to get to the point where you left

With my current solution being:

  • use the "beforeOpen" event to attach the current ":focus" element to the dialog (via .prop())
  • use the "close" event to set focus again
/**
 * @param id	The id of the dialog element
 */
function bindDialogFocusEvents(id) {
	$('#'+id).bind('dialogclose', function(event) {
		$(this).prop('focused').focus();
	});
	$('#'+id).bind('dialogbeforeopen', function(event) {
		var target = $(':focus');
		$(this).prop('focused', target);
	});
}
$("#new-dialog").dialog({modal: true, ...});
bindDialogFocusEvents('new-dialog');

Maybe it's possible to add the "focus restoration" functionality to the dialog code as well, but I would be happy with just the "beforeOpen" event for now...

#8655 fixed Spinner buttons displayed on top of Datepicker Benco
Description

When a Datepicker is displayed, if it is on top of a Spinner, its up and down buttons are visible.

demo : http://jsfiddle.net/Benco/W2CeV/

Affected browsers :
FF 15.0.1
IE 8.0
Chrome 22.0.1229.92 m
Safari 5.1.7

OS : Windows 7 Enterprise SP1

note : this had been reported before, but refused as a bug, since Spinner was a plugin at the time. Ticket :http://bugs.jqueryui.com/ticket/3188

Note: See TracQuery for help on using queries.