Disabled buttons in dart2js version too

Fixed disabled buttons in dialogs in the dart2js version

Fixed #2350

review: @ussuri

Could you please add `// TODO(ussuri): BUG #2252` before this function?