launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06840
[Merge] lp:~wgrant/launchpad/bug-961920 into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bug-961920 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #961920 in Launchpad itself: "TextFieldPickerPlugin sets textfield.value = null which breaks in IE"
https://bugs.launchpad.net/launchpad/+bug/961920
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-961920/+merge/98795
Picker patchers on text widgets (eg. the AJAX bit of project selector on https://bugs.launchpad.net/) initialise their search textbox with the value of the in-page textbox. In most browsers this works fine in all cases, but if the source textbox is empty then IE sets the search textbox to "null". This branch fixes that.
The fix is simple. IE just doesn't like having a textbox's value set to null, so we must use '' instead. Interestingly, the same thing is done just 10 lines above, presumably to work around this very issue.
--
https://code.launchpad.net/~wgrant/launchpad/bug-961920/+merge/98795
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-961920 into lp:launchpad.
=== modified file 'lib/lp/app/javascript/picker/picker.js'
--- lib/lp/app/javascript/picker/picker.js 2012-03-14 12:53:47 +0000
+++ lib/lp/app/javascript/picker/picker.js 2012-03-22 08:08:19 +0000
@@ -1310,7 +1310,7 @@
if ( input.get("value") ) {
selected_value = input.get("value");
}
- this.get('host')._search_input.set('value', selected_value);
+ this.get('host')._search_input.set('value', selected_value || '');
this.get('host').set(SELECTED_VALUE, selected_value);
});
}