0

Problem

I have an Eclipse RAP application, and as soon as I change some dropdown box value, random texts became changed in my application. They become bigger. You may need to know, that in Eclipse RAP all styles are inlined and calculated server side.

Steps to Reproduce

  1. I open a tab inside RAP with a page with dropdown lists enter image description here

  2. Change the dropdown till random texts inside the browser become bigger (usually happens by first trial) enter image description here

Investigation so far

  • I checked the JSON ajax request-replies, nothing is related to font change. Actually nothing is related to the tab widget in which I am currently and which has its font changed.
  • I attached a function to the div representing the tab inside debugger using onpropertychanged event. I log the names of events. When I change the dropdown list and the tab text becomes bigger, there is nothing style.font* in the console. Other things like background color change display the events.
  • the last thing is hillerious. As soon as I click on inspect, and I "touch" the client area of my application with the mouse, all fonts become OK. So inspecting the problem is impossible: enter image description here

Question

  • Did you see something similar ever?
  • Do you know about known issues for IE, which could cause this?
  • Is there any workaround?

Update

So the problem is originated from my using custom fonts with @font-face. I realized the followings: - Using web-font kit generated by FontSquirrel does not make any difference. IE loads then EOT (i checked with developer tools), but still the fonts are changing randomly. - I tried a randomly downloaded TTF, same problem occours. - if I remove the fallbacks from the css font definitions, there is no "font-change" phenomen described above - if there is no fallback, IE uses the custom font always, but it seems to have calculation problems when it comes to the width of a text div. For example from my two word menu items only one word is shown (obviously the second word is word wrapped).

Solution

I guess the solution for me is to use native fonts. I don't want to spend my life with hacking around bugs of IE.

Gábor Lipták
  • 9,646
  • 2
  • 59
  • 113

1 Answers1

1

My suggestion is to look at this bug report.

From your image I can see that your doctype is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

which triggers quirks (refer here) mode rendering in browsers. So my suggestion is to try to change it.

pages rendered in quirks mode might not be able to take advantage of features the browser supports when using standards mode.

in IE the CSS rules applied when the :hover pseudo selector are not applied when using quirks mode (colour should change and pointer should turn into a hand).

faby
  • 7,394
  • 3
  • 27
  • 44