On Thursday, September 8, 2016 at 12:47:33 PM UTC-6, Rupert Smith wrote:
>
> On Thursday, September 8, 2016 at 7:44:39 PM UTC+1, Rupert Smith wrote:
>>
>> On Thursday, September 8, 2016 at 6:50:30 PM UTC+1, OvermindDL1 wrote:
>>>
>>> It is because you should 'switch' the interface within your dialog to be 
>>> whatever it needs to be at the time.  It is in my opinion a design 
>>> consideration to prevent multiple dialogs from even being capable of 
>>> appearing at the same time, which often breaks sites that do that.
>>>
>>> But yeah, just inside the dialog just draw whatever type of interface is 
>>> appropriate at the time.
>>>
>>
>> Ok, could try that. I suspect that it was not a deliberate design choice 
>> though - just something awkward about implementing dialogs?
>>
>
> Perhaps I am wrong about that: 
>
>
> http://stackoverflow.com/questions/19051408/jquery-dialog-opening-multiple-dialogs
>  
>

Unrelated, that is pure class based not element based.  :-)

`mdl` (and thus `elm-mdl`) uses real html5 dialog: 
 http://www.w3schools.com/tags/tag_dialog.asp

However many browsers are crappy enough to not support html5 that well yet, 
so there is a polyfill you can add (which you probably should), and the 
polyfill has some limitations: 
 https://github.com/GoogleChrome/dialog-polyfill#limitations

And elm-mdl would have to connect a dialog with its id somehow, which is 
'string'y and easy to break (much more easy to break with more than one elm 
app too, hard problem to solve), however the elm style already has the 
concept of 'views' of a single thing that mutate, so they went the realm of 
that you mutate the dialog to contain whatever it should contain.  :-)

> I also notice in the Elm demo that the dialog gets hoisted out of the 
Dialog tab and placed at the top of the page, something to do with the 
limitations of the dialog polyfill. 

Polyfill stuff yep, dialogs need to be 'global'.  HTML5 dialogs are odd, 
and would be less odd if browsers followed the spec, but eh...

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to