History

All I wanted to do was use HTML5 in a SharePoint 2010 site. What a can of worms I opened up - especially when it came to the default people picker (aka entity picker, aka entity editor) - it is completely broken if your master page is using the HTML5 doctype.

Investigating this issue showed many disturbing things. Here is a brief list of them:

  • The people picker actually works when using Chrome or Firefox - this is because the control 'downgrades' itself into a textarea - which allows users to be added/removed, but comes at a high price: The UI is even more terrible than the IE version of the control.
  • There is divergent client code to support the 'down level' mode - none of which has any sort of scoping. The code also does crazy XML parsing and hair-brained DOM manipulation. It is easily some of the worst 'production' JavaScript you will ever see.
  • Forcing IE into the 'down level' people picker mode proved to be a barely acceptable solution. The best you can do is end up with something brittle that mysteriously breaks from time to time do to the inflexible nature of the core people picker code + markup.
  • There are some proposed solutions out there to resolve the people picker + HTML5 issues by injecting client side functions to do a couple of things, most notably add some missing namespaces to XML so it does not cause an error when submitted to the server. In my experience, these solutions were not 100% reliable and in general not easily implemented.
  • That enough? Here is one final one: The UI of the default people picker, working or note, has always been really awful. Maybe it was a security measure - since if people cannot grant users permissions, there is less of a chance for trouble...

So the next step was to come up with a way to terminate the default people picker control and replace it with something better... In the end the default people picker is more 'buried alive' than terminated, but all the end user will see is a much improved experience.

-Chad

Last edited Feb 19, 2013 at 3:44 PM by chadschroeder, version 2

Comments

No comments yet.