Fix an issue about positioning after width of element changed.