Bug 124037 - Non-zero offsetWidth of an empty element
Summary: Non-zero offsetWidth of an empty element
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.9
: P2 Normal
Assignee: Nobody
URL: http://dev.ckeditor.com/ticket/11111
Depends on:
Reported: 2013-11-08 03:58 PST by Aleksander Nowodziński
Modified: 2016-06-07 10:21 PDT (History)
5 users (show)

See Also:

Sample to reproduce the issue (448 bytes, text/html)
2013-11-08 03:58 PST, Aleksander Nowodziński
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksander Nowodziński 2013-11-08 03:58:56 PST
Created attachment 216373 [details]
Sample to reproduce the issue

Since Safari 7 (OSX 10.9), empty elements seem to have a non-zero offsetWidth under certain circumstances, which
obviously is invalid and leads to other issues. For example:

	// OffsetWidth of <b> is 1, why?
	<p>bold1 <i><b></b>x</i></p> 

	// OffsetWidth of <b> is 0.
	<p>bold3 <b></b></p> 

It looks like a regression in browser's engine as neither previous Safari nor other browsers behave like that.
I'm attaching a simple sample to reproduce the issue.

This issue refers to http://dev.ckeditor.com/ticket/11111
Comment 1 Piotrek Koszuliński (Reinmar) 2014-09-05 06:39:19 PDT
The same bug now got to the Chrome :D https://code.google.com/p/chromium/issues/detail?id=395136
Comment 2 m.lewandowski 2016-06-06 23:43:33 PDT
Chrome team seems to have fixed the bug, so now it's only WebKit left with this bug.