Menu

#2764 (ok 3.1.1) Drop-down menu blinking in FF

3.0.0
fixed
1
2013-06-11
2008-09-21
mark_pmw
No

At the bottom of the "Structure" tab, you can add fields to the table...
1) At the end of the table
2) At the beginning of the table
3) After a selected field

If you try #3 in Firefox and attempt to use the drop down menu to select a field, the menu will blink and snap back to its default setting.
Works fine in IE7 though.

Thanks!

Discussion

  • Marc Delisle

    Marc Delisle - 2008-09-21
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-09-21

    Tested in FF 3. For me, it works by holding the mouse on the arrow, it is the same for you?

     
  • mark_pmw

    mark_pmw - 2008-09-21

    That works for me too. Normally, I just tap with my touchpad to get the menu to display. If I hold the left button down, I can select the option.

    Thanks,
    Mark

     
  • Marc Delisle

    Marc Delisle - 2008-09-29
    • assigned_to: lem9 --> nobody
     
  • Marc Delisle

    Marc Delisle - 2008-10-13
    • summary: (3.0) Add # of fields after [drop-menu] doesn't work in FF --> (3.0) Drop-down menu blinking in FF
     
  • Benjamin

    Benjamin - 2008-10-30

    Same issue here. I'm using Firefox 3.0.3, and I can confirm this issue exists in both PMA 3.0.0 and 3.0.1.

    Eliminating either the onclick or onchange attribute for the select element fixes the issue. If I recall correctly, onclick works for both keyboards and mice despite it's name, so perhaps you can eliminate the onchange.

    Steps to reproduce:
    1. Navigate to a "Structure" page for a table and scroll down to where you can add a column.
    2. Click (and release) the drop-down menu for "After".
    3. Note that the menu does not expand.

    Expected behavior:
    The menu should expand when you click and release the mouse button.

    Temporary workaround:
    Click and hold the mouse button on the menu.

     
  • Marc Delisle

    Marc Delisle - 2008-11-23

    Hmm, with Firefox 3.0.4 on Vista, I tried several things, always clearing my cache between attempts:

    - leaving just onchange
    - leaving just onclick
    - using onfocus
    - removing all js attached to this control

    believe it or not, in all situations, the drop-down blinks. I even tried just this
    <select name="after_field"> and it still blinks. I'm lost.

     
  • Marc Delisle

    Marc Delisle - 2008-11-28
    • summary: (3.0) Drop-down menu blinking in FF --> Drop-down menu blinking in FF
     
  • David Fox

    David Fox - 2008-12-01

    OK, after much debugging, I think I fixed it. It was certainly a very strange issue.

    The problem lies with PMA_generate_html_radio in common.lib.php. I noticed in the HTML that was being generated, the ID for each radio button in "field_where" was the same. That's not allowed. So, I just removed the id attribute in line 2343 of libraries/common.lib.php. Now, I would think that probably breaks things elsewhere, but it looks like it is definitely the cause of this issue. The resolution would seem to be to make each option in the radio button generated get an ID such as $html_field_name_$i or something like that.

    Hope this helps.

    Regards,
    ~David

     
  • David Fox

    David Fox - 2008-12-01

    Here's a little mockup of what I'm talking about:

    function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='') {
    $id_num = 0;
    foreach ($choices as $choice_value => $choice_label) {
    if (! empty($class)) {
    echo '<div class="' . $class . '">';
    }
    $html_field_id = $html_field_name . '_' . $choice_value;
    echo '<input type="radio" name="' . $html_field_name . '" id="' . $html_field_id . '_' . $id_num . '" value="' . htmlspecialchars($choice_value) . '"';
    if ($choice_value == $checked_choice) {
    echo ' checked="checked"';
    }
    echo ' />' . "\n";
    echo '<label for="' . $html_field_id . '">' . ($escape_label ? htmlspecialchars($choice_label) : $choice_label) . '</label>';
    if ($line_break) {
    echo '<br />';
    }
    if (! empty($class)) {
    echo '</div>';
    }
    echo "\n";
    $id_num++;
    }
    }

     
  • Marc Delisle

    Marc Delisle - 2008-12-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-12-01

    David,
    Sorry to contradict you but the IDs for the radio buttons for "field_where" are already unique:
    field_where_last, field_where_first, field_where_after.
    They are generated by appending each choice value.

    <input type="radio" name="field_where" id="field_where_last" value="last" checked="checked" />
    <label for="field_where_last">At End of Table</label>
    <input type="radio" name="field_where" id="field_where_first" value="first" />
    <label for="field_where_first">At Beginning of Table</label>
    <input type="radio" name="field_where" id="field_where_after" value="after" />
    <label for="field_where_after">After

     
  • Marc Delisle

    Marc Delisle - 2008-12-01

    The cause of the problem is that Firefox 3 does not like the <select>...</select> drop-down inside a label. If I put it outside the label, the blinking no longer occurs.

    The drop-down is inside the lable because $strAfter contains a parameter %s which is a placeholder for the drop-down, for better localization of this message.

    Maybe I'll have to remove this localization trick to get rid of the blinking.

     
  • Marc Delisle

    Marc Delisle - 2008-12-03
    • summary: Drop-down menu blinking in FF --> (ok 3.1.1) Drop-down menu blinking in FF
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2008-12-09
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed