Closed htremura closed 2 months ago
Even when using the StoryInterface
special passage open dialogs should continue to render the underlying page inert. I'd prefer to simply call this a bug and address the issue in code.
That is reasonable and I agree. I didn't want to assume the intended functionality and whether or not that was intended behavior. Thanks for everything you do with SugarCube!
Is your feature request related to a problem? In playing with dialogs and a custom StoryInterface I found that if the StoryInterface does not contain a
<div id="story">
wrapped around the<div id="passages">
the Dialog API will not fully work. e.g. elements in the passage that should have their z-index subtracted when a dialog is opened do not because SugarCube's JQuery does not target them correctly. This means that, even with a dialog open, the user is still able to hitTAB
to select links in the underlying passage and activate them with theRETURN/ENTER
key.Describe the solution you'd like. The Documentation for StoryInterface should include a note about the Dialog API not fully working when there isn't a
story
ID'ed element.Additional context. An example of a StoryInterface that was allowing interaction in the passage below the dialog:
And an example of the same StoryInterface, but fixed to disallow interaction in the passage below dialogs: