(GWT) Should we use only widgets that support Standards mode? What if we use ones that only support Quirks mode?

StackOverflow https://stackoverflow.com/questions/19089771

  •  29-06-2022
  •  | 
  •  

Pergunta

Let see example, I used TabPanel (only work in Quirks mode) for my layout, at the first glance, it seems simple, easy to code, but when I click a link inside that TabPanel I noticed there were some minor shaking...> this could degrade users' experience a little bit.

Now i tried to use TabLayoutPanel (only work in Standards mode) for my layout. This is harder to code, TabLayoutPanel is more complicated, but i don't have that minor issue above.

Now, TabPanel is quite simple & compatible to the older web browser but is not 100% smooth. TabLayoutPanel does not work in older browser but is really smooth.

So, based on the pro & con above, which one do u choose? Quirks mode or Standards mode Widgets?

Foi útil?

Solução

You should use standards mode. Quirks mode in 2013 is a code smell.

Widgets initially designed for quirks mode (what was working the most "reliably" across browsers a few years ago, back when GWT was created) should work in standards mode, but with… quirks.

So, use TabPanel if if fits your needs, but be prepared to work around display quirks (with CSS).

TabPanel and TabLayoutPanel are not interchangeable. You could also use a TabBar with a DeckLayoutPanel, or build your tabs "manually", it's really easy and most of the time you don't really need the higher-level abstraction that the built-in widgets provide.


BTW,

TabLayoutPanel does not work in older browser

What do you mean by "older browsers"? TabLayoutPanel works well in all browsers that GWT support (back to IE6), and GWT 2.6 is going to deprecate (and disable by default) IE6 and IE7 support (which also removes support for quirks mode in IE8+, but as I said, you shouldn't use quirks mode anyway).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top