Web Dialog and HTML (datalist)

In Sketchup WebDialog does not work datalist:
>

       <datalist id='Door_type'> 
       <option value='spf_110'>
       <option value='spf_210'> 
       <option value='spf_310'>
       <option value='spf_320'> 
       <option value='spf_410'>
     </datalist>	

In chrome it is works properly.

Do you have any ideas why?

Standards information from the <datalist> page:

HTML5 and MS IE 10 min.

Ref: <datalist>: The HTML Data List element - HTML: HyperText Markup Language | MDN

SketchUp may be setting the IE emulation to something pre-10.
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION


WORKAROUND

Use <optgroup> in a <select> element instead. It only requires HTML v4.01:

<select>
  <optgroup label="Alkaline Metals">
    <option>Lithium (Li)</option>
    <option>Sodium (Na)</option>
    <option>Potassium (K)</option>
  </optgroup>
  <optgroup label="Halogens">
    <option>Fluorine (F)</option>
    <option>Chlorine (Cl)</option>
    <option>Bromine (Br)</option>
  </optgroup>
</select> 
1 Like

[quote=“mamjankowski, post:1, topic:26881”]
Do you have any ideas why?
[/quote]IE…

I have changed value in registry to “Internet Explorer 11” (was IE9) and now it works quite well.
Thanks Dan!

Good. But,… you cannot expect the average user to be able to change that, and … the setting is likely optimized for the current behavior of the internal webdialogs for Trimble EW and 3DW.

You might also be able to use a higher document compatibility mode with a <meta> tag in the <head> element.

see:

Dan, of course, you’re right. As usual;-)
I added to html something like that:
> <meta http-equiv='X-UA-Compatible' content='IE=EmulateIE10'>
and I changed registers to IE version 9999.
And everything works properly.
By the way do you remember what registration should be for Sketchup 15.2.685 65 bit?

I think browser emulation has been set to 0x270F (9999) since SketchUp stopped supporting Windows XP, which was v 15.0.

I have the same problem but on Mac/Chrome. Datalist does not work. Setting the document compatibility mode seems to be a Windows thing and optgroup does not provide the filtering functionality I need. Any thoughts?

datalist doesn’t work in Chrome Embedded Framework used by SU…

it is to do with Chrome [not CEF] adding it as part of autocomplete…

you can use Ruby to emulate it…

john

1 Like

Before suggesting any thoughts, it would be helpful if you first tell whether you are using a UI::WebDialog or UI::HtmlDialog (SketchUp 2017+) and which SketchUp version…

1 Like

htmlDialog.

…ongoing discussion at: