* Renders view. * @protected * @return {HTMLElement}
()
| 226 | * @return {HTMLElement} |
| 227 | */ |
| 228 | render () { |
| 229 | this._$dialog = this.renderDialog() |
| 230 | this._$outer = View.createElement('div', { |
| 231 | className: 'modal__outer' |
| 232 | }, [ |
| 233 | this._$dialog |
| 234 | ]) |
| 235 | |
| 236 | return View.createElement('div', { |
| 237 | className: 'modal', |
| 238 | role: 'dialog', |
| 239 | // Makes element focusable but not reachable via keyboard |
| 240 | tabIndex: -1 |
| 241 | }, [ |
| 242 | View.createElement('div', { |
| 243 | className: 'modal__backdrop' |
| 244 | }), |
| 245 | View.createElement('div', { |
| 246 | className: 'modal__scrollable', |
| 247 | role: 'document', |
| 248 | onClick: evt => { |
| 249 | if (evt.target === evt.currentTarget) { |
| 250 | evt.preventDefault() |
| 251 | this.cancel() |
| 252 | } |
| 253 | } |
| 254 | }, [ |
| 255 | this._$outer |
| 256 | ]) |
| 257 | ]) |
| 258 | } |
| 259 | |
| 260 | /** |
| 261 | * Renders modal dialog. |
nothing calls this directly
no test coverage detected