Menu

#360 Datalist doesn't show any options in report page using chrome

Minor
open
nobody
None
5
2016-07-13
2016-07-11
Anonymous
No

On the report page any datalist (i.e. room list) doesn't show any options using chrome, but it works with Edge.
Inspecting the problem I recognized this code, maybe this causes the problem:
<select style="display:none"> Any idea to solve it?</select>

1 Attachments

Discussion

  • Campbell Morrison

    Thanks for reporting this. Yes, I can reproduce the problem so will investigate.

     
  • Campbell Morrison

    The problem is not the display:none, but the autocomplete attribute on the input element. The code has this set to "off" by default because many browsers will present the list of previous field inputs as well as the options which might not be the behaviour that one wants. For some browsers turning off autocomplete also turns off the list off options, so for those browsers it is set to "on". It looks like the latest Chrome is one of those, and should be included in that list.

    As a temporary fix I suggest you modify line 1370 [MRBS 1.5.0] of fumctions.inc from

      $html .= (strpos(utf8_strtolower($HTTP_USER_AGENT), 'opera') === FALSE) ? 'off' : 'on';
    

    to

      $html .= (strpos(utf8_strtolower($HTTP_USER_AGENT), 'opera') === FALSE) ? 'on' : 'on';
    

    Meanwhile I'll think some more about the behaviour that we want and also look some more at how datalists work.

     
  • Campbell Morrison

    I notice that with the temporary fix above the behaviour in Edge is now slightly annoying: the input history is displayed over the top of the datalist options in a way that means that you can't see the first few options.

    I am working on a better fix - hope to have it available soon.

     
  • Campbell Morrison

    I've now (changeset 8d611ed5f07a) checked a fix into the default branch.

     
MongoDB Logo MongoDB