I’ve added a Search Field to a Web project. Works fine, but what I’d like to have is a little “x” at the end so that the contents of the field can easily be cleared - pretty common UI for this kind of thing.
It should be possible to get most recent browsers to add the “x” automatically, by using “type=search” to the HTML that’s used to display the field - see http://www.html5tutorial.info/html5-search.php. I’ve had a look at the HTML that Xojo generates for a WebSearchField, and it uses type=text instead of type=search. There doesn’t seem to be any obvious way to change this.
Is there a good reason why Xojo should use “type=text” for WebSearchFields, am I missing something, or is this a feature request job?
I’ve looked at it with Chrome, IE11, and Edge - all on Windows 10. Interestingly, IE and Edge do display the “x” even though I can confirm with their respective Developer Tools that the line of HTML they’re rendering is indeed as above with type=“text”. It’s only Chrome that doesn’t play ball. If I use Chrome’s Developer Tools to tweak the HTML so that type=“search”, Chrome adds the “x” too, but the height of the field decreases.
What happens when you build a Web app on a Mac, and then connect to it with a Windows browser? How do the search fields display, given that the Mac-built Web app is producing different code for the browser to render?
It has nothing to do with where the app was built. The control HTML is built for the browser at runtime. You see the best representation for the user agent presented. As features evolve, sometimes that representation needs to change.
If you are serious about making sure your app looks good in all browsers, you should consider having an emulator installed to check how it looks under other systems. I use VMWare Fusion on Mac, but you can also download VirtualBox.