From 93ea066f53d5d2b2a19cf0dd2e9479a3fc5796f7 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 30 Aug 2013 09:47:37 +0200 Subject: [PATCH] Remove TreeDropdownField placeholder support (see #2364) It breaks the semantics of getValue(), leading to a broken field. Regression from 8b5f89f. In the end, placeholder support is considered "progressive enhancement", the search box should be pretty obvious to IE8/IE9 users either way, given the main field label is called "choose or search". --- javascript/TreeDropdownField.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/javascript/TreeDropdownField.js b/javascript/TreeDropdownField.js index 340fc1098..1ba2fa4c5 100644 --- a/javascript/TreeDropdownField.js +++ b/javascript/TreeDropdownField.js @@ -296,25 +296,10 @@ cancelSearch: function() { this.closePanel(); this.loadTree(); - }, - getValue: function(title){ - //Provide value for IE8 and 9 as they don't support placeholders - return ($.browser.msie && parseInt($.browser.version, 10) <= 9) ? title:''; } }); $('.TreeDropdownField.searchable input.search').entwine({ - onfocusin: function(){ - //IE placeholder support - this.val(''); - }, - onfocusout: function(){ - //IE placeholder support - var value = this.closest('.TreeDropdownField').getValue(this.attr('placeholder')); - if(this.val() === ''){ - this.val(value); - } - }, onkeydown: function(e) { var field = this.getField(); if(e.keyCode == 13) {