In a medium skillet, melt butter over medium heat. Add onion; cover and cook until onion is tender, about 10 minutes. Uncover, increase heat to medium-high, and cook, stirring occasionally, until onion is golden brown. Remove from heat, and stir in vinegar. Set aside to let cool.
In a small bowl, stir together yeast, sugar, and warm milk; let stand until mixture is foamy, about 5 minutes.
In a large bowl, beat egg, melted butter, and salt with a mixer at medium speed until smooth. Add yeast mixture, beating until combined. Gradually add flour and poppy seeds, beating until a soft dough forms.
On a lightly floured surface, turn out dough and knead until smooth and elastic, about 5 minutes.
Spray a separate large bowl with cooking spray. Place dough in bowl, turning to grease top. Lightly cover, and let stand in a warm, draft-free place (85°) until doubled in size, about 1 hour.
Lightly spray 20 muffin cups with cooking spray.
On a lightly floured surface, roll out dough into a 20x8-inch rectangle. Sprinkle with onions and cheese, leaving a 1-inch border on all sides. Starting with one long side, roll up dough, jelly roll style, and press edge to seal. Cut into 1-inch-thick slices, and place in prepared muffin cups. Lightly cover, and let stand in a warm, draft -free place (85°) until doubled in size, about 1 hour.
Preheat oven to 350°.
Bake until golden brown, 12 to 15 minutes. Serve warm.
Recipe by Victoria at https://victoriamag.com/caramelized-onion-gruyere-and-poppy-seed-rolls-recipe/