Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mlapptools.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ function fontWeight(uiElement, weight)
% A method for obtaining the webwindow handle and the widgetID corresponding
% to the provided uifigure control.
% Get a handle to the webwindow
win = mlapptools.getWebWindow(uiElement.Parent);
p = uiElement.Parent;
while ~isa(p,'matlab.ui.Figure')
p = p.Parent;
end
win = mlapptools.getWebWindow(p);

% Find which element of the DOM we want to edit
widgetID = mlapptools.getWidgetID(win, mlapptools.getDataTag(uiElement));
Expand Down