[Phpmyadmin-devel] Settings page always show restore default value

Aris Feryanto aris_feryanto at yahoo.com
Tue May 24 15:45:54 CEST 2011


Hi Tyron,

On 24 Mei 2011, at 20:13, Tyron Madlener <tyronx at gmail.com> wrote:

> On Tue, May 24, 2011 at 2:49 PM, Aris Feryanto <aris_feryanto at yahoo.com> wrote:
>> On 24 Mei 2011, at 17:17, Marc Delisle <marc at infomarc.info> wrote:
>> 
>>> Le 2011-05-24 03:19, Aris Feryanto a écrit :
>>>> Hi all,
>>>> 
>>>> I've just merged my branch with the current phpMyAdmin official master
>>>> branch and want to add a new field in the settings page.
>>>> But, when I open settings page, then open some settings tab, I noted that
>>>> the green arrow button to restore default value is always shown on every
>>>> fields.
>>>> I also have confirmed this on the phpMyAdmin demo page.
>>>> Is some recent changes cause this?
>>> 
>>> Hi Aris,
>>> thanks for noticing this.
>>> 
>>> Using the technique explained in [0], it seems that this happened when
>>> upgrading from jQuery 1.4.4 to 1.6.1.
>> I found a link [0] and in the section "Upgrading From 1.5.2 to 1.6.1", there
>> are some notes about the new split of .attr() into two functions: .attr()
>> and .prop(). And I looked into config.js, there are a lot of usage of
>> .attr('tagName'), which is in jQuery 1.6.1 must be accessed through
>> .prop('tagName'). I think we can do a quick replace of .attr('X'), for some
>> X which is now considered as property in jQuery 1.6.1.
>> [0] http://blog.jquery.it/2011/05/12/jquery-1-6-1-released/
> 
> I think you are incorrect. That behavior was indeed implemented in
> jQuery 1.6, but reverted back in 1.6.1.
> 
> Hence the sentence in the blog:
> - "When updating from 1.5.2 to 1.6.1, you should not have to change
> any attribute code."
> - "However, as previously stated, jQuery 1.6.1 will allow you to use
> .attr() just as it was used before in all situations."
> 
> So the bug (theoretically) should not come from the .attr() behavior.
> 


Later in the blog, I see that even it is said that jQuery 1.6.1 will allow you to use .attr() just as it was used before in all situations, some DOM element only can be retrieved using .prop(). In the "preferred usage" table, while most properties are still supported for backward compatibility with .attr() (thicked gray), you can see some other attributes, including "tagName", only thicked for .prop().

I already tried this in Chrome's developer tools and using .attr('tagName') returns undefined.

--
Aris Feryanto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110524/fa559cf0/attachment.html>


More information about the Developers mailing list