nyroDev/nyroModal — Issue #156: Title position not recalculated when using html for title formatting
Author: djeglin
Created: 2012-01-17 14:34:36+00:00
State: open

As referenced in other issues on here, it is possible to get nyroModal to use html in the modal title. I have managed to get this to work but if, for example, there is a
in the title text, this is converted properly to html and inserted into the title in the beforeShowCont callback, but the position of said title is not recalculated to take into account the increased height of the title element. Even upon resizing the browser window, which should trigger a resize event, the second line and on of the title sits below the modal.

Is there any way I can hook in to get nyroModal to recalculate the position of the title after the content has been changed? I have tried doing something with afterResize and nm.elts.cont.offset() already, but can't seem to get it to work properly.

The coce being used for the html title is included below, taken from another issue on this list:

beforeShowCont: function(nm) {
if (nm._hasFilter('title') && nm.opener.is('[rev]')) {
nm.store.title.html(''+nm.store.title.text()+'');
}
},

Any help greatly appreciated

David